WO2019109922A1 - 资源处理方法及系统、存储介质、电子设备 - Google Patents

资源处理方法及系统、存储介质、电子设备 Download PDF

Info

Publication number
WO2019109922A1
WO2019109922A1 PCT/CN2018/119240 CN2018119240W WO2019109922A1 WO 2019109922 A1 WO2019109922 A1 WO 2019109922A1 CN 2018119240 W CN2018119240 W CN 2018119240W WO 2019109922 A1 WO2019109922 A1 WO 2019109922A1
Authority
WO
WIPO (PCT)
Prior art keywords
priority
resource
processing method
weight coefficient
request
Prior art date
Application number
PCT/CN2018/119240
Other languages
English (en)
French (fr)
Inventor
赵君杰
苏京
Original Assignee
京东方科技集团股份有限公司
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 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Priority to EP18885631.4A priority Critical patent/EP3723343B1/en
Priority to KR1020207019608A priority patent/KR102601628B1/ko
Priority to US16/769,308 priority patent/US11228537B2/en
Priority to JP2020530578A priority patent/JP7313351B2/ja
Publication of WO2019109922A1 publication Critical patent/WO2019109922A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/76Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
    • H04L47/762Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions triggered by the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • 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/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/61Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources taking into account QoS or priority requirements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/10Detection; Monitoring
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/30Control
    • G16Y40/35Management of things, i.e. controlling in accordance with a policy or in order to achieve specified objectives
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/822Collecting or measuring resource availability data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/828Allocation of resources per group of connections, e.g. per group of users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0278Traffic management, e.g. flow control or congestion control using buffer status reports

Definitions

  • the present disclosure relates to the field of information processing technologies, and in particular, to a priority-based resource processing method, a priority-based resource processing system, a computer readable storage medium, and an electronic device.
  • the Internet of Things service uses resources to express information about the functions and status of the device.
  • the control of the device is implemented by operations on resources. Common operations can include creating, updating, obtaining, deleting, and notifying.
  • Embodiments of the present disclosure relate to a priority-based resource processing method, a priority-based resource processing system, a computer readable storage medium, and an electronic device.
  • a priority-based resource processing method including:
  • the priority-based resource processing method before the calculating the first priority of the first resource and the second priority of the second resource, the priority-based resource processing method further includes:
  • calculating the first priority of the first resource includes:
  • calculating, according to the priority impact parameter of the first resource, the first priority of the first resource includes:
  • the priority-based resource processing method after performing the first operation request corresponding to the first resource, the priority-based resource processing method further includes:
  • the second operation request corresponding to the second resource is executed at a first preset time interval.
  • the first priority impact parameter includes one of a first base priority, a first resource subscribed number, a first resource acquired number, and a first resource updated number. Or multiple.
  • the first priority is a first weight coefficient * a first base priority, a second weight coefficient * a first resource subscribed number, a third weight coefficient * a first resource The sum of the acquired number and the fourth weighting coefficient * the first resource is updated;
  • the at least one of the first weight coefficient, the second weight coefficient, the third weight coefficient, and the fourth weight coefficient is not zero.
  • the first operation request includes one or more of a creation request, an update request, an acquisition request, a deletion request, and a notification request.
  • a priority-based resource processing system including:
  • a priority calculation module configured to calculate a first priority of the first resource and a second priority of the second resource
  • a priority determining module configured to determine whether a first priority of the first resource is greater than a second priority of the second resource
  • the operation request execution module is configured to execute a first operation request corresponding to the first resource when determining that the first priority is greater than the second priority.
  • a computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the priority-based resource processing method of any of the above.
  • an electronic device including:
  • a memory for storing executable instructions of the processor
  • the processor is configured to perform the priority-based resource processing method of any of the above described above by executing the executable instruction.
  • FIG. 1 schematically shows a flow chart of a priority based resource processing method.
  • Fig. 2 schematically shows a flow chart of a first priority calculation method.
  • FIG. 3 schematically shows a flow chart of a device group registration method.
  • FIG. 4 schematically shows an example of the structure of a device group resource.
  • FIG. 5 schematically shows a flow chart of another priority based resource processing method.
  • Fig. 6 is a view schematically showing an example of the structure of a container resource.
  • Figure 7 schematically illustrates a block diagram of a priority based resource processing system.
  • FIG. 8 schematically shows an electronic device for implementing the above-described priority-based resource processing method.
  • FIG. 9 schematically illustrates a computer readable storage medium for implementing the above-described priority-based resource processing method.
  • the Internet of Things system is a bridge between the producer of information and the consumer of information.
  • the specific communication process may include: First, the producer can continuously send information to the Internet of Things system; secondly, the Internet of Things system can receive The information generated by the producer is stored; finally, the consumer can continuously obtain information from the Internet of Things system for consumption.
  • the agreement specifies two types of entities: Application Entity (AE) and Common Service Entity (CSE); one entity can register with another entity; for example, AE can register with CSE, CSE also You can register with the CSE and create a resource (AE or CSE) on the CSE after successful registration.
  • the AE can operate on the resources on the CSE through operations such as CRUDN (create, update, get, delete, and notify), such as updating the contents of the container under the AE resource through an UPDATE operation request.
  • the ⁇ AE> resource can be used to identify the application logic in the physical device
  • the ⁇ node> can be used to identify the related information of the physical device
  • the ⁇ container> can be used to serve as the container and store the specific content information.
  • the ⁇ group> resource can be used. Combine resources for management.
  • the subscription notification mechanism defined by the Internet of Things may be as follows: First, the AE sends a subscription request to the CSE, and the request may include a subscription event type; secondly, when the CSE generates a subscription event type, an event is generated, and the CSE may request the notification. Sended to the AE; then, when the AE receives the notification request, the AE may feed back the response information of the notification request to the CSE.
  • the priority-based resource processing method may include the following steps:
  • Step S110 Calculate a first priority of the first resource and a second priority of the second resource.
  • Step S120 Determine whether the first priority of the first resource is greater than the second priority of the second resource.
  • step S130 when it is determined that the first priority is greater than the second priority, the first operation request corresponding to the first resource is executed.
  • the operation request with a higher priority is processed first, thereby avoiding the response operation caused by the excessive number of operation requests.
  • the request causes confusion and reduces the burden on the system.
  • the execution speed of the higher priority operation request is improved, and the service quality of the system is improved. Improved user experience.
  • step S110 a first priority of the first resource and a second priority of the second resource are calculated.
  • any device, gateway or service platform and applications registered on them can be abstracted into resources and have a unique resource identifier, ie URI (Uniform Resource Identifier), which can be uniquely located according to the resource identifier.
  • the processing of the accessed resource request may include obtaining Retrieve, creating Create, updating Update, deleting Delete, and Notify. It should be noted that a plurality of resources may exist on the device to which the accessed resource belongs, and the device to which the accessed resource belongs may determine the resource that the requester resource wishes to access according to the identifier of the accessed resource.
  • the calculating the first priority of the first resource and the second priority of the second resource may include: calculating a first priority of the first resource according to the first priority impact parameter of the first resource; The second priority affecting parameter of the second resource calculates a second priority of the second resource.
  • the first resource and the second resource are only used to represent two different resources, and the order of each resource is not limited.
  • the first resource is The second resource is described as an example, but an example including more resources may also be applied, which is also within the protection scope of the present disclosure.
  • calculating the first priority of the first resource according to the first priority impact parameter of the first resource may include step S210 and step S220. among them:
  • a weight coefficient is configured for the first priority impact parameter of the first resource.
  • the first priority impact parameter of the first priority may include a first base priority, a total number of first resources subscribed, a total number of first resources acquired, a total number of first resources updated, and the like. among them:
  • the first base priority can be determined according to the level of resources. Among them, the root resource has the highest priority, and the direct resource priority of the root resource is second, and so on.
  • a resource can be a sub-resource of multiple resources, its priority is determined according to the priority of its parent resource; for example, CSEBase has a priority of up to 10, CSEBase's direct sub-resources ⁇ AE>, ⁇ node>, ⁇
  • the priority of the request> is 9, and the ⁇ subscription> can be a sub-resource of the CSEBase or a sub-resource of the resource such as ⁇ AE>, so the priority of the ⁇ subscription> resource is determined according to its parent resource.
  • the number of first resources to be subscribed (totalNrOfSubscriptions): the number of subscriptions of the first resource may be the number of subscribers; or the number of subscription resources ⁇ subscription>; since different events can be determined by the event notification rule eventNotificationCriteria, this The number of times the first resource is subscribed is the number of event notification rules.
  • the number of subscriptions of the first resource may also be any combination of the above three cases.
  • the number of acquired first resources (totalNrOfRetrieve): the number of acquired first resources can record the total number of acquisition requests currently received and save them to totalNrOfRetrieve;
  • TotalNrOfUpdate The total number of updated first resources can record the total number of acquisition requests currently received and save them in totalNrOfUpdate. It should be further added here that the first basic priority may be determined by one of the determining factors, or may be combined by two or two or any three factors, and the four factors are collectively determined. limit.
  • step S210 is explained and explained based on the first priority influence parameter of the first priority.
  • Configuring a weight coefficient for the first priority impact parameter of the first resource wherein the number of the weight coefficient may be one, two, three, or four, etc.; due to the number of weight coefficients and the number of determinants One-to-one correspondence, therefore, when the first priority is determined by a first priority affecting parameter, a weighting coefficient can be configured; when the first priority is determined by two first priority affecting parameters, Configure two weighting factors, and so on, and do not repeat them here.
  • step S220 the first priority influence parameter and the weight coefficient corresponding to the priority influence parameter are calculated to obtain the first priority.
  • the first priority affecting parameter and the weighting coefficient corresponding to the priority impact parameter of the first resource may be operated to obtain a first priority; wherein the operation may include multiplying and/or adding Etc., other operations may be included, such as rounding or taking, etc., and this example does not specifically limit this.
  • the proportion of d1 and d2 can be increased, and the proportion of d3 and d4 can be reduced.
  • the proportion of d2 can be increased.
  • the proportion of the other three parameters is relatively reduced.
  • the method includes: acquiring a first priority impact parameter of the first resource and a second priority affecting parameter of the second resource.
  • the priority impact parameters may include a base priority (baseQosLevel), a resource subscription number (totalNrOfSubscriptions), a resource acquisition number (totalNrOfRetrieve), and a total number of resource updates (totalNrOfUpdate), etc.; therefore, each resource priority impact Parameters can be obtained from the sender of each operation request.
  • step S120 it is determined whether the first priority of the first resource is greater than the second priority of the second resource.
  • the first priority of the first resource and the second priority of the second resource are calculated, it is determined whether the first priority of the first resource is greater than the second priority of the second resource. For example, if the first priority of the first resource is 58 and the second priority of the second resource is 42, the first priority of the first resource may be determined to be greater than the second priority of the second resource.
  • step S130 when it is determined that the first priority is greater than the second priority, the first operation request corresponding to the first resource is executed. For example:
  • the first operation request corresponding to the first resource may be directly executed first.
  • the first operation request may include obtaining Retrieve, creating Create, updating Update, deleting Delete, Notify, and the like, and may also include other operations, such as adding and merging, etc., which is not particularly limited in this example.
  • the operation corresponding to the second resource may be performed by using a preset time (which may be 3 min or 5 min, or other time, which is not specifically limited in this example).
  • the request may also be performed when the CSE is idle, and the operation request corresponding to the second resource is not specifically limited. In this way, the problem that the system is in a state of inactivity and the system is in a sleep state cannot receive the resource subscription request sent by other devices in time can be avoided, thereby improving the working efficiency of the entire system.
  • the first resource and the second resource are taken as an example in the present example, the example including more resources may also be applied, which is also within the protection scope of the present disclosure.
  • step S310 In order to verify the validity of the received first operation request and the second operation request, it is also required to register the first sender of the first operation request and the second sender of the second operation request, and refer to the figure. As shown in FIG. 3, specific steps may include step S310 and step S320. among them:
  • step S310 a first registration request sent by the first sender of the first operation request and a second registration request sent by the second sender of the second operation request are received.
  • the CSE receives the first registration request sent by the first sender of the first operation request and the second registration request sent by the second sender of the second operation request; wherein the first sender may include multiple first devices, for example, AE1, AE2, ..., AEN, etc.; the second sender may include a plurality of second devices, for example, may be AE1, AE2, ..., AEM, etc.; here, it is necessary to additionally explain that M and N The values may be the same or different, and this example does not specifically limit this.
  • step S320 in response to the first registration request and the second registration request, the first sender and the second identity are determined according to the first identity of the first sender and the second identity of the second sender.
  • the sender registers. In detail:
  • the CSE After receiving the first registration request and the second registration request, the CSE responds to the first registration request and the second registration request, and according to the first identity identifier of the first sender and the second identity identifier of the second sender.
  • the first sender and the second sender register. By registering each sender, it is convenient to determine the legitimacy of the request according to the identifier when receiving the subscription request sent by the sender, thereby improving the security of the entire system.
  • the requested resource can be a group resource.
  • a group resource is created for multiple requested resources.
  • the group of resources may include the following parameters: a device type (memberType), a current device number (currentNrOfMembers), a maximum device number (MaxNrOfMembers), a device identity (memberIDs), and a group resource subscription number (currentNrOfSubscriptions).
  • the number of times the group resource is acquired (totalNrOfRetrieve), the number of times the group resource is updated (totalNrOfUpdate), the group resource base priority (baseQosLevel), the group resource dynamic priority (dynamicQosLevel), the group resource current dynamic priority start time (dynamicQosStartTime), and FanoutPoint (fanOutPoint).
  • the present disclosure also provides another priority based resource processing method.
  • the priority-based resource processing method may include steps S510 to S530. among them:
  • step S510 the third update request sent by the first member device and the fourth update request sent by the second member device are received.
  • the first member device may be, for example, a smoke sensor (AEx), and the second member device may be, for example, a temperature sensor (AEy); further, when new information is updated in AEx and AEy, a third may be sent to the CSE.
  • the update request and the fourth update request are received; after the CSE listens to the third update request and the fourth update request sent by the AEx and the AEy, the third update request and the fourth update request are received.
  • step S520 it is determined whether the third priority of the first member device is greater than the fourth priority of the second member device.
  • the CSE determines whether the third priority of the third update request is greater than the fourth priority of the fourth update request.
  • the third priority of the third update request and the fourth priority of the fourth update request may be determined according to factors of each member device.
  • the third priority and the fourth priority are also calculated, which may include: calculating a third priority of the first container and the The fourth priority of the second container.
  • the weight coefficient is configured; wherein the number of the weight coefficients may be one, two, three or four, etc.; since the number of weight coefficients is one-to-one corresponding to the number of determining factors, therefore, when When the third priority is determined by a determining factor, a weighting coefficient may be configured; when the third priority is determined by two determining factors, two weighting coefficients may be configured, and so on, and are not described herein again;
  • one or more products may be obtained by multiplying the weighting coefficient corresponding to the determining factor by the determining factor.
  • d1, d2, d3, and d4 are weight coefficients respectively; the sizes of d1, d2, d3, and d4 can be adjusted according to the needs of different service systems; for example, a system uses message notification as the main service, and the proportion of d1 and d2 It can be increased, the proportion of d3 and d4 can be reduced; for example, if a business system mainly passively receives query requests, the proportion of d2 can be increased, and the proportions of the other three parameters are relatively reduced;
  • the result of the quadrature operation may be directly used as the third priority; for example, d1*baseQosLevel or d2*totalNrOfSubscriptions or d3*totalNrOfRetrieve or d4* may be used.
  • step S530 when it is determined that the third priority is greater than the fourth priority, the third update request is preferentially executed.
  • the first sender subscribes to the change information of the group resource, a notification message in response to the third update request is sent to the first sender.
  • the confirmation message responding to the third update request may be directly sent to the first sender of the first operation request.
  • the fourth update request may be performed by a second preset time (which may be 3 min or 5 min, or other time, and the present example does not specifically limit this).
  • the notification message that is sent to the first sender is sent to the first sender, and may be separated by a second preset time (may be 3 minutes or 5 minutes, or may be At other times, this example does not specifically limit this, and sends a notification message in response to the fourth update request to the second sender, or may send a notification message in response to the fourth update request to the second sending when the CSE is idle.
  • This example does not impose any special restrictions on this. In this way, the problem that the system is in a state of inactivity and the system is in a sleep state cannot receive the operation request sent by other devices in time can be avoided, thereby improving the working efficiency of the entire system.
  • the requested resource may be a non-group resource, such as a container resource.
  • the container resource may include the following parameters: maximum number of instances (maxNrOfInstances), maximum number of bytes (maxByteSize), current maximum number of instances (currentNrOfInstances), current bytes (currentByteSize), group resources are subscribed. Number of times (currentNrOfSubscriptions), number of times the group resource was acquired (totalNrOfRetrieve), number of times the group resource was updated (totalNrOfUpdate), group resource base priority (baseQosLevel), group resource dynamic priority (dynamicQosLevel), instance content (contentInstance), and subscribed content (subscription) and so on.
  • the present disclosure also provides a priority based resource processing system.
  • the priority-based resource processing system may include a priority calculation module 710, a priority determination module 720, and an operation request execution module 730. among them:
  • the receiving module 710 can be configured to calculate a first priority of the first resource and a second priority of the second resource.
  • the priority determining module 720 can be configured to determine whether the first priority of the first resource is greater than a second priority of the second resource.
  • the resource subscription request execution module 730 may be configured to execute the first operation request corresponding to the first resource when determining that the first priority is greater than the second priority.
  • the technical solution according to an embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network.
  • a non-volatile storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a number of instructions are included to cause a computing device (which may be a personal computer, server, mobile terminal, or network device, etc.) to perform a method in accordance with an embodiment of the present disclosure.
  • an electronic device capable of implementing the above method is also provided.
  • FIG. 8 An electronic device 800 in accordance with such an embodiment of the present invention is described below with reference to FIG. 8 is merely an example and should not impose any limitation on the function and scope of use of the embodiments of the present invention.
  • electronic device 800 is embodied in the form of a general purpose computing device.
  • the components of the electronic device 800 may include, but are not limited to, the at least one processing unit 810, the at least one storage unit 820, and a bus 830 that connects different system components (including the storage unit 820 and the processing unit 810).
  • the storage unit stores program code, which can be executed by the processing unit 810, such that the processing unit 810 performs various exemplary embodiments according to the present invention described in the "Exemplary Method" section of the present specification.
  • the processing unit 810 may perform step S110 as shown in FIG. 1 : calculating a first priority of the first resource and a second priority of the second resource; 120: determining a first priority of the first resource Whether the level is greater than the second priority of the second resource; Step S130: When it is determined that the first priority is greater than the second priority, the first operation request corresponding to the first resource is executed.
  • the storage unit 820 can include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 8201 and/or a cache storage unit 8202, and can further include a read only storage unit (ROM) 8203.
  • RAM random access storage unit
  • ROM read only storage unit
  • the storage unit 820 can also include a program/utility 8204 having a set (at least one) of the program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more applications, other program modules, and program data, Implementations of the network environment may be included in each or some of these examples.
  • Bus 830 may be representative of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any of a variety of bus structures. bus.
  • the electronic device 800 can also communicate with one or more external devices 700 (eg, a keyboard, pointing device, Bluetooth device, etc.), and can also communicate with one or more devices that enable the user to interact with the electronic device 800, and/or with Any device (eg, router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. This communication can take place via an input/output (I/O) interface 850. Also, electronic device 800 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830.
  • network adapter 860 communicates with other modules of electronic device 800 via bus 830.
  • the technical solution according to an embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network.
  • a non-volatile storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a number of instructions are included to cause a computing device (which may be a personal computer, server, terminal device, or network device, etc.) to perform a method in accordance with an embodiment of the present disclosure.
  • a computer readable storage medium having stored thereon a program product capable of implementing the above method of the present specification.
  • aspects of the present invention may also be embodied in the form of a program product comprising program code for causing said program product to run on a terminal device The terminal device performs the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section of the present specification.
  • a program product 900 for implementing the above method which may employ a portable compact disk read only memory (CD-ROM) and includes program code, and may be in a terminal device, is illustrated in accordance with an embodiment of the present invention.
  • CD-ROM portable compact disk read only memory
  • the program product of the present invention is not limited thereto, and in the present document, the readable storage medium may be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus or device.
  • the program product can employ any combination of one or more readable media.
  • the readable medium can be a readable signal medium or a readable storage medium.
  • the readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive lists) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer readable signal medium may include a data signal that is propagated in the baseband or as part of a carrier, carrying readable program code. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium can also be any readable medium other than a readable storage medium that can transmit, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device.
  • Program code embodied on a readable medium can be transmitted using any suitable medium, including but not limited to wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.
  • Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., including conventional procedural Programming language—such as the "C" language or a similar programming language.
  • the program code can execute entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the remote computing device on the user computing device, or entirely on the remote computing device or server. Execute on.
  • the remote computing device can be connected to the user computing device via any kind of network, including a local area network (LAN) or wide area network (WAN), or can be connected to an external computing device (eg, provided using an Internet service) Businesses are connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Businesses are connected via the Internet.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本公开是关于一种基于优先级的资源处理方法及系统,属于信息处理技术领域,该基于优先级的资源处理方法包括:计算第一资源的第一优先级以及第二资源的第二优先级;判断所述第一资源的第一优先级是否大于第二资源的第二优先级;在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。

Description

资源处理方法及系统、存储介质、电子设备
交叉引用
本申请要求于2017年12月8日提交的申请号为201711299113.6、发明名称为“资源订阅方法及系统、存储介质、电子设备”的中国专利申请的优先权,该中国专利申请的全部内容通过引用全部并入本文。
技术领域
本公开涉及信息处理技术领域,具体而言,涉及一种基于优先级的资源处理方法、基于优先级的资源处理系统、计算机可读存储介质以及电子设备。
背景技术
随着物联网技术的发展,越来越多的终端设备通过网络接入服务器。物联网服务通过资源来表达设备的功能、状态等信息,对设备的控制通过对资源的操作实现,常用的操作可以包括创建、更新、获取、删除和通知等。
当同时有多个设备对某一资源进行操作时,容易造成服务器处理拥塞,影响对紧急请求的处理,因此,需要提供一种新的基于优先级的资源处理方法及系统。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本公开的实施例涉及一种基于优先级的资源处理方法、基于优先级的资源处理系统、计算机可读存储介质以及电子设备。
根据本公开的一个方面,提供一种基于优先级的资源处理方法,包括:
计算第一资源的第一优先级以及第二资源的第二优先级;
判断所述第一资源的第一优先级是否大于第二资源的第二优先级;
在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。
在本公开的一种示例性实施例中,在计算所述第一资源的第一优先级以及所述第二资源的第二优先级之前,所述基于优先级的资源处理方法还包括:
获取所述第一资源的第一优先级影响参数以及所述第二资源的第二优先级影响参数。
在本公开的一种示例性实施例中,计算所述第一资源的第一优先级包括:
根据所述第一资源的第一优先级影响参数计算所述第一资源的第一优先级。
在本公开的一种示例性实施例中,根据所述第一资源的优先级影响参数计算所述第一资源的第一优先级包括:
为所述第一资源的第一优先级影响参数配置权重系数;
对所述第一优先级影响参数以及所述优先级影响参数对应的权重系数进行运算得到所述第一优先级。
在本公开的一种示例性实施例中,在执行所述第一资源对应的第一操作请求之后,所述基于优先级的资源处理方法还包括:
间隔第一预设时间,执行所述第二资源对应的第二操作请求。
在本公开的一种示例性实施例中,所述第一优先级影响参数包括第一基础优先级、第一资源被订阅数、第一资源被获取数以及第一资源被更新数中的一个或多个。
在本公开的一种示例性实施例中,所述第一优先级为第一权重系数*第一基础优先级、第二权重系数*第一资源被订阅数、第三权重系数*第一资源被获取数以及第四权重系数*第一资源被更新数之和;
其中,所述第一权重系数、第二权重系数、第三权重系数以及第四权重系数中至少有一个不为零。
在本公开的一种示例性实施例中,所述第一操作请求包括创建请求、更新请求、获取请求、删除请求、通知请求中的一个或多个。
根据本公开的一个方面,提供一种基于优先级的资源处理系统,包括:
优先级计算模块,用于计算第一资源的第一优先级以及第二资源的第二优先级;
优先级判断模块,用于判断所述第一资源的第一优先级是否大于第二资源的第二优先级;
操作请求执行模块,用于在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。
根据本公开的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的基于优先级的资源处理方法。
根据本公开的一个方面,提供一种电子设备,包括:
处理器;以及
存储器,用于存储所述处理器的可执行指令;
其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一项所述的基于优先级的资源处理方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示意性示出一种基于优先级的资源处理方法的流程图。
图2示意性示出一种第一优先级计算方法的流程图。
图3示意性示出一种设备组注册方法的流程图。
图4示意性示出一种设备组资源的结构示例图。
图5示意性示出另一种基于优先级的资源处理方法的流程图。
图6示意性示出一种容器资源的结构示例图。
图7示意性示出一种基于优先级的资源处理系统的框图。
图8示意性示出一种用于实现上述基于优先级的资源处理方法的电子设备。
图9示意性示出一种用于实现上述基于优先级的资源处理方法的计算机可读存储介质。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
物联网系统是信息的产生方和信息的消费方之间的桥梁,其具体的通信过程可以包括:首先,产生方可以不断的将信息发送给物联网系统;其次,物联网系统可以对接收到的产生方产生的信息进行存储;最后,消费方可以不断从物联网系统获取信息进行消费。
进一步的,对物联网协议规定的实体进行进一步的解释以及说明。该协议规定了 两类实体:应用实体(AE,Application Entity)和通用服务实体(CSE,Common Service Entity);其中,一个实体可以向另外一个实体进行注册;例如,AE可以向CSE注册,CSE也可以向CSE注册,注册成功后在CSE上创建资源(AE或CSE)。AE可以通过CRUDN(创建、更新、获取、删除和通知)等操作对CSE上的资源进行操作,如通过UPDATE操作请求更新AE资源下的容器内容。
在上述物联网架构下,设备和平台相关的功能通过资源进行标识。其中,<AE>资源可以用来标识物理设备内的应用逻辑,<node>可以用来标识物理设备的相关信息,<container>可以用来充当容器并存放具体的内容信息,<group>资源可以将资源组合起来进行管理。
该物联网定义的订阅通知机制可以如下步骤:首先,AE向CSE发送订阅请求,请求中可以包括订阅的事件类型;其次,当CSE产生订阅的事件类型时,则产生事件,CSE可以通过通知请求发送给AE;然后,AE接收到该通知请求时,可以将接收到通知请求的响应信息反馈至CSE。
本示例实施方式首先提供了一种基于优先级的资源处理方法。参考图1所示,该基于优先级的资源处理方法可以包括以下步骤:
步骤S110.计算第一资源的第一优先级以及第二资源的第二优先级。
步骤S120.判断所述第一资源的第一优先级是否大于第二资源的第二优先级。
步骤S130.在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。
上述基于优先级的资源处理方法中,一方面,通过设置优先级,当接收到多个操作请求时,先处理优先级较高的操作请求,避免了由于操作请求数量过多造成的在响应操作请求的同时引起混淆的问题,同时减少了系统的负担;另一方面,通过先执行优先级较高的操作请求,提高了优先级较高的操作请求的执行速度,提升了系统的服务质量同时提升了用户体验。
下面,将对本示例实施方式中上述基于优先级的资源处理方法中的各步骤进行详细的解释以及说明。
在步骤S110中,计算第一资源的第一优先级以及第二资源的第二优先级。
首先,对资源进行解释以及说明。在现有的物联网规范中,任何设备、网关或业务平台以及注册在它们上面的应用,都可以被抽象为资源并且具有唯一的资源标识,即URI(UniformResource Identifier),根据资源标识可以唯一定位资源。对被访问资源请求的处理可以包括获取Retrieve、创建Create、更新Update、删除Delete以及Notify等。需要说明的是,被访问资源所属的设备上可能同时存在多个资源,所述被访问资源所属的设备可以根据被访问资源的标识确定请求者资源希望访问的资源。
其次,基于上述资源对步骤S110进行解释以及说明。其中,计算第一资源的第一优先级以及第二资源的第二优先级可以包括:根据所述第一资源的第一优先级影响 参数计算所述第一资源的第一优先级;以及根据所述第二资源的第二优先级影响参数计算所述第二资源的第二优先级。此处需要补充说明的是,此处第一资源以及第二资源仅用来表示两种不同的资源,并不对各资源的顺序等进行限定;进一步的,本示例中虽然是以第一资源以及第二资源为例进行说明,但是对于包括更多个资源的示例也可以适用,这同样属于本公开的保护范围。进一步的,参考图2所示,根据所述第一资源的第一优先级影响参数计算所述第一资源的第一优先级可以包括步骤S210以及步骤S220。其中:
在步骤S210中,为所述第一资源的第一优先级影响参数配置权重系数。详细而言:
首先,对上述第一优先级的第一优先级影响参数进行解释以及说明。上述第一优先级的第一优先级影响参数可以包括第一基础优先级、第一资源被订阅总数、第一资源被获取总数以及第一资源被更新总数等等。其中:
第一基础优先级(baseQosLevel):第一基础优先级可以根据资源的层级进行确定。其中,根资源的基础优先级最高,根资源的直接子资源优先级次之,依次类推。当一个资源可以是多个资源的子资源时,其优先级根据其父资源的优先级进行确定;例如:CSEBase的优先级为最高10,CSEBase的直接子资源<AE>,<node>,<request>的优先级为9,<subscription>可以是CSEBase的子资源,也可以是<AE>等资源的子资源,所以<subscription>资源的优先级根据其父资源进行确定;
第一资源被订阅数(totalNrOfSubscriptions):第一资源被订阅数可以为订阅方的个数;也可以为订阅资源<subscription>的个数;由于不同的事件可以通过事件通知规则eventNotificationCriteria进行确定,此时第一资源被订阅数为事件通知规则的个数。第一资源被订阅数也可是上述三种情况的任意组合。
第一资源被获取数(totalNrOfRetrieve):第一资源被获取数可以记录当前总共收到的获取请求数并将其保存到totalNrOfRetrieve中;
第一资源被更新总数(totalNrOfUpdate):第一资源被更新总数可以记录当前总共收到的获取请求数并保存到totalNrOfUpdate中。此处需要进一步补充说明的是,上述第一基础优先级可以由其中的一个决定因素进行决定,也可以两两组合或者任意三个进行组合或者四个因素集体决定,本示例对此不做特殊限制。
其次,基于上述第一优先级的第一优先级影响参数对上述步骤S210进行解释以及说明。为第一资源的第一优先级影响参数配置权重系数;其中,该权重系数的个数可以为一个、两个、三个或者四个等等;由于权重系数的个数与决定因素的个数是一一对应的,因此,当第一优先级由一个第一优先级影响参数进行确定时,可以配置一个权重系数;当第一优先级由两个第一优先级影响参数进行确定时,可以配置两个权重系数,依次类推,在此不再赘述。
在步骤S220中,对所述第一优先级影响参数以及所述优先级影响参数对应的权 重系数进行运算得到所述第一优先级。详细而言:
当上述权重系数配置完成以后,可以对第一优先级影响参数以及第一资源的优先级影响参数对应的权重系数进行运算得到第一优先级;其中,该运算可以包括相乘和/或相加等等,也可以包括其他运算,例如可以是取整或者取余等等,本示例对此不做特殊限制。举例而言:当第一优先级由四个第一优先级影响参数决定时,则求积运算的过程可以为:第一求积运算结果=d1*baseQosLevel;第二求积运算结果=d2*totalNrOfSubscriptions;第三求积运算结果=d3*totalNrOfRetrieve;第四求积运算结果=d4*totalNrOfUpdate。其中,d1、d2、d3以及d4分别为第一权重系数、第二权重系数、第三权重系数以及第四权重系数。因此,第一优先级可以为:dynamicQosLevel=d1*baseQosLevel+d2*totalNrOfSubscriptions+d3*totalNrOfRetrieve+d4*totalNrOfUpdate。此处需要补充说明的是,在上述表达式中,d1、d2、d3以及d4至少有一个是不为零的;并且,d1、d2、d3以及d4的大小可以根据不同业务系统的需要进行调节;例如,一个系统以消息通知为主要业务,则d1以及d2的比重可以增加,d3以及d4的比重可以减小;又例如,一个业务系统主要是被动接收查询请求,则d2的比重可以增加,其他三个参数的比重相对减小。进一步的,由于第二优先级的计算方法与第一优先级的计算方法相同,因此本公开对此不再赘述。
进一步的,为了便于上述第一优先级以及第二优先级的计算,还需要获取各优先级的优先级影响参数。具体的可以包括:获取所述第一资源的第一优先级影响参数以及所述第二资源的第二优先级影响参数。其中,由于各优先级影响参数可以包括基础优先级(baseQosLevel)、资源被订阅数(totalNrOfSubscriptions)、资源被获取数(totalNrOfRetrieve)以及资源被更新总数(totalNrOfUpdate)等等;因此,各资源优先级影响参数可以从各操作请求的发送方处进行获取。
在步骤S120中,判断所述第一资源的第一优先级是否大于第二资源的第二优先级。详细而言:
当上述第一资源的第一优先级以及第二资源的第二优先级计算完成后,判断第一资源的第一优先级是否大于第二资源的第二优先级。例如,第一资源的第一优先级为58,第二资源的第二优先级为42,则可以判断第一资源的第一优先级大于第二资源的第二优先级。
在步骤S130中,在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。举例而言:
当根据上述优先级计算方法得到的第一优先级的计算结果大于第二优先级的计算结果时,可以直接先执行第一资源对应的第一操作请求。其中,该第一操作请求可以包括获取Retrieve、创建Create、更新Update、删除Delete以及Notify等等,也可以包括其他操作,例如可以是增加以及合并等等,本示例对此不做特殊限制。通过先处理优先级较高的资源订阅请求,避免了由于资源订阅请求数量过多造成的在响应资 源订阅请求的同时引起混淆的问题,同时减少了系统的负担。
进一步的,当上述第一资源订阅请求执行完成以后,可以间隔一预设时间(可以为3min或者5min,也可以是其他时间,本示例对此不做特殊限制)执行上述第二资源对应的操作请求,也可以在CSE空闲时,执行上述第二资源对应的操作请求,本示例对此不做特殊限制。通过该方式,可以避免系统长久的处于不工作状态带而引起的系统处于休眠不能及时接收其他设备发送的资源订阅请求的问题,提升了整个系统的工作效率。此处需要进一步补充说明的是,本示例中虽然是以第一资源以及第二资源为例进行说明,但是对于包括更多个资源的示例也可以适用,这同样属于本公开的保护范围。
进一步的,为了对接收到的第一操作请求以及第二操作请求的合法性进行验证,还需要对第一操作请求的第一发送者以及第二操作求的第二发送者进行注册,参考图3所示,具体的可以包括步骤S310以及步骤S320。其中:
在步骤S310中,接收第一操作请求的第一发送者发送的第一注册请求以及第二操作请求的第二发送者发送的第二注册请求。详细而言:
CSE接收第一操作请求的第一发送者发送的第一注册请求以及第二操作请求的第二发送者发送的第二注册请求;其中,第一发送者可以包括多个第一设备,例如可以为AE1、AE2、……、AEN等等;第二发送者可以包括多个第二设备,例如可以为AE1、AE2、……、AEM等等;此处需要补充说明的是,M和N的数值可以相同,也可以不同,本示例对此不做特殊限制。
在步骤S320中,响应所述第一注册请求以及第二注册请求,根据所述第一发送者的第一身份标识以及第二发送者的第二身份标识对所述第一发送者以及第二发送者进行注册。详细而言:
当CSE接收到上述第一注册请求以及第二注册请求后,响应该第一注册请求以及第二注册请求,并根据第一发送者的第一身份标识以及第二发送者的第二身份标识对第一发送者以及第二发送者进行注册。通过对各发送者进行注册,便于当接收到发送者发送的订阅请求时,可以根据标识判断请求的合法性,提升整个系统的安全。
进一步的,被请求资源可以为组资源。当多个被请求资源所在的实体注册完成后,为多个被请求资源创建组资源。参考图4所示,该组资源中可以包括如下参数:设备类别(memberType)、当前设备数量(currentNrOfMembers)、设备最大数量(MaxNrOfMembers)、设备身份标识(memberIDs)、组资源被订阅次数(currentNrOfSubscriptions)、组资源被获取次数(totalNrOfRetrieve)、组资源被更新次数(totalNrOfUpdate)、组资源基础优先级(baseQosLevel)、组资源动态优先级(dynamicQosLevel)、组资源当前动态优先级起始时间(dynamicQosStartTime)以及扇出点(fanOutPoint)。
本公开还提供了另一种基于优先级的资源处理方法。参考图5所示,该基于优先 级的资源处理方法可以包括步骤S510-步骤S530。其中:
在步骤S510中,接收第一成员设备发送的第三更新请求以及第二成员设备发送的第四更新请求。详细而言:
首先,上述第一成员设备例如可以是烟雾传感器(AEx),第二成员设备例如可以是温度传感器(AEy);进一步的,当AEx以及AEy中有新的信息更新时,可以向CSE发送第三更新请求以及第四更新请求;当CSE监听到AEx以及AEy发送的第三更新请求以及第四更新请求后,接收该第三更新请求以及第四更新请求。
在步骤S520中,判断所述第一成员设备的第三优先级是否大于第二成员设备的第四优先级。详细而言:
当CSE接收到上述第三更新请求以及第四更新请求后,判断第三更新请求的第三优先级是否大于第四更新请求的第四优先级。其中,第三更新请求的第三优先级以及第四更新请求的第四优先级可以根据各成员设备的自身因素进行决定。
进一步的,为了便于第三优先级以及第四优先级的判断,还需要对第三优先级以及第四优先级进行计算,具体的可以包括:计算所述第一容器的第三优先级以及所述第二容器的第四优先级。详细而言:
首先,配置权重系数;其中,该权重系数的个数可以为一个、两个、三个或者四个等等;由于权重系数的个数与决定因素的个数是一一对应的,因此,当第三优先级由一个决定因素进行确定时,可以配置一个权重系数;当第三优先级由两个决定因素进行确定时,可以配置两个权重系数,依次类推,在此不再赘述;
进一步的,当上述权重系数配置完成以后,可以利用决定因素与决定因素对应的权重系数相乘得到一个或多个乘积。举例而言:第三优先级由四个决定因素决定时,则求积运算的过程可以为:第一求积运算结果=d1*baseQosLevel;第二求积运算结果=d2*totalNrOfSubscriptions;第三求积运算结果=d3*totalNrOfRetrieve;第四求积运算结果=d4*totalNrOfUpdate。其中,d1、d2、d3以及d4分别为权重系数;d1、d2、d3以及d4的大小可以根据不同业务系统的需要进行调节;例如,一个系统以消息通知为主要业务,则d1以及d2的比重可以增加,d3以及d4的比重可以减小;又例如,一个业务系统主要是被动接收查询请求,则d2的比重可以增加,其他三个参数的比重相对减小;
更进一步的,当决定第三优先级的决定因素为一个时,可以直接将求积运算的结果作为该第三优先级;例如:可以将d1*baseQosLevel或者d2*totalNrOfSubscriptions或者d3*totalNrOfRetrieve或者d4*totalNrOfUpdate直接作为第三优先级;当决定第三优先级的决定因素为多个时,可以将多个求积运算结果进行相加得到第三优先级,例如:dynamicQosLevel=d1*baseQosLevel+d2*totalNrOfSubscriptions+d3*totalNrOfRetrieve+d4*totalNrOfUpdate;也可以两两相加或者任意三个组合相加,本示例对此不做特殊限制。进一步的,由于第四优先级的计算方法与第三优先级的计 算方法相同,因此本公开对此不再赘述。
在步骤S530中,在判断所述第三优先级大于所述第四优先级时,优先执行所述第三更新请求。当第一发送者订阅了所述组资源的变化信息时,将响应所述第三更新请求的通知消息发送至所述第一发送者。详细而言:
当根据上述优先级计算方法得到的第三优先级的计算结果大于第四优先级的计算结果时,可以直接将响应第三更新请求的确认消息发送至第一操作请求的第一发送者。通过先处理优先级较高的更新请求,避免了由于操作请求数量过多造成的在响应操作请求的同时引起混淆的问题,同时减少了系统的负担。
进一步的,执行第三更新请求后,可以间隔第二预设时间(可以为3min或者5min,也可以是其他时间,本示例对此不做特殊限制)执行第四更新请求。进一步,当第一发送者订阅了所述组资源的变化时,将响应第三更新请求的通知消息发送给第一发送方,可以间隔第二预设时间(可以为3min或者5min,也可以是其他时间,本示例对此不做特殊限制),将响应第四更新请求的通知消息发送至第二发送者,也可以在CSE空闲时,将响应第四更新请求的通知消息发送至第二发送者,本示例对此不做特殊限制。通过该方式,可以避免系统长久的处于不工作状态带而引起的系统处于休眠不能及时接收其他设备发送的操作请求的问题,提升了整个系统的工作效率。
进一步的,被请求资源可以是非组资源,如容器资源等。参考图6所示,该容器资源中可以包括如下参数:实例最大数量(maxNrOfInstances)、最大字节数(maxByteSize)、当前最大实例数(currentNrOfInstances)、当前字节数(currentByteSize)、组资源被订阅次数(currentNrOfSubscriptions)、组资源被获取次数(totalNrOfRetrieve)、组资源被更新次数(totalNrOfUpdate)、组资源基础优先级(baseQosLevel)、组资源动态优先级(dynamicQosLevel)、实例内容(contentInstance)以及已订阅内容(subscription)等等。
本公开还提供了一种基于优先级的资源处理系统。参考图7所示,该基于优先级的资源处理系统可以包括优先级计算模块710、优先级判断模块720以及操作请求执行模块730。其中:
接收模块710可以用于计算第一资源的第一优先级以及第二资源的第二优先级。
优先级判断模块720可以用于判断所述第一资源的第一优先级是否大于第二资源的第二优先级。
资源订阅请求执行模块730可以用于在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。
上述基于优先级的资源处理系统中各模块的具体细节已经在对应的基于优先级的资源处理方法中进行了详细的描述,因此此处不再赘述。
此外,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才 能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、移动终端、或者网络设备等)执行根据本公开实施方式的方法。
在本公开的示例性实施例中,还提供了一种能够实现上述方法的电子设备。
所属技术领域的技术人员能够理解,本发明的各个方面可以实现为系统、方法或程序产品。因此,本发明的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
下面参照图8来描述根据本发明的这种实施方式的电子设备800。图8显示的电子设备800仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图8所示,电子设备800以通用计算设备的形式表现。电子设备800的组件可以包括但不限于:上述至少一个处理单元810、上述至少一个存储单元820、连接不同系统组件(包括存储单元820和处理单元810)的总线830。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元810执行,使得所述处理单元810执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。例如,所述处理单元810可以执行如图1中所示的步骤S110:计算第一资源的第一优先级以及第二资源的第二优先级;120:判断所述第一资源的第一优先级是否大于第二资源的第二优先级;步骤S130:在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。
存储单元820可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)8201和/或高速缓存存储单元8202,还可以进一步包括只读存储单元(ROM)8203。
存储单元820还可以包括具有一组(至少一个)程序模块8205的程序/实用工具8204,这样的程序模块8205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线830可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备800也可以与一个或多个外部设备700(例如键盘、指向设备、蓝牙设 备等)通信,还可与一个或者多个使得用户能与该电子设备800交互的设备通信,和/或与使得该电子设备800能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口850进行。并且,电子设备800还可以通过网络适配器860与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器860通过总线830与电子设备800的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备800使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本发明的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。
参考图9所示,描述了根据本发明的实施方式的用于实现上述方法的程序产品900,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的 任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
此外,上述附图仅是根据本发明示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。

Claims (11)

  1. 一种基于优先级的资源处理方法,包括:
    计算第一资源的第一优先级以及第二资源的第二优先级;
    判断所述第一资源的第一优先级是否大于第二资源的第二优先级;
    在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。
  2. 根据权利要求1所述的基于优先级的资源处理方法,其中,在计算所述第一资源的第一优先级以及所述第二资源的第二优先级之前,所述基于优先级的资源处理方法还包括:
    获取所述第一资源的第一优先级影响参数以及所述第二资源的第二优先级影响参数。
  3. 根据权利要求2所述的基于优先级的资源处理方法,其中,计算所述第一资源的第一优先级包括:
    根据所述第一资源的第一优先级影响参数计算所述第一资源的第一优先级。
  4. 根据权利要求3所述的基于优先级的资源处理方法,其中,根据所述第一资源的第一优先级影响参数计算所述第一资源的第一优先级包括:
    为所述第一资源的第一优先级影响参数配置权重系数;
    对所述第一优先级影响参数以及所述优先级影响参数对应的权重系数进行运算得到所述第一优先级。
  5. 根据权利要求1至4任一项所述的基于优先级的资源处理方法,其中,在执行所述第一资源对应的第一操作请求之后,所述基于优先级的资源处理方法还包括:
    间隔第一预设时间,执行所述第二资源对应的第二操作请求。
  6. 根据权利要求2-4任一所述的基于优先级的资源处理方法,其中,所述第一优先级影响参数包括第一基础优先级、第一资源被订阅数、第一资源被获取数以及第一资源被更新数中的一个或多个。
  7. 根据权利要求6所述的基于优先级的资源处理方法,其中,所述第一优先级为第一权重系数*第一基础优先级、第二权重系数*第一资源被订阅数、第三权重系数*第一资源被获取数以及第四权重系数*第一资源被更新数之和;
    其中,所述第一权重系数、第二权重系数、第三权重系数以及第四权重系数中至少有一个不为零。
  8. 根据权利要求1-7任一所述的基于优先级的资源处理方法,其中,所述第一操作请求包括创建请求、更新请求、获取请求、删除请求、通知请求中的一个或多个。
  9. 一种基于优先级的资源处理系统,包括:
    优先级计算模块,用于计算第一资源的第一优先级以及第二资源的第二优先级;
    优先级判断模块,用于判断所述第一资源的第一优先级是否大于第二资源的第二优先 级;
    操作请求执行模块,用于在判断所述第一优先级大于所述第二优先级时,执行所述第一资源对应的第一操作请求。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1-8任一项所述的基于优先级的资源处理方法。
  11. 一种电子设备,包括:
    处理器;以及
    存储器,用于存储所述处理器的可执行指令;
    其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1-8任一项所述的基于优先级的资源处理方法。
PCT/CN2018/119240 2017-12-08 2018-12-04 资源处理方法及系统、存储介质、电子设备 WO2019109922A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP18885631.4A EP3723343B1 (en) 2017-12-08 2018-12-04 Resource processing method and system, storage medium and electronic device
KR1020207019608A KR102601628B1 (ko) 2017-12-08 2018-12-04 리소스 처리 방법 및 시스템, 저장 매체, 전자 기기
US16/769,308 US11228537B2 (en) 2017-12-08 2018-12-04 Resource processing method and system, storage medium and electronic device
JP2020530578A JP7313351B2 (ja) 2017-12-08 2018-12-04 リソースの処理方法及びシステム、記憶媒体、電子機器

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711299113.6A CN109905435A (zh) 2017-12-08 2017-12-08 资源订阅方法及系统、存储介质、电子设备
CN201711299113.6 2017-12-08

Publications (1)

Publication Number Publication Date
WO2019109922A1 true WO2019109922A1 (zh) 2019-06-13

Family

ID=66750813

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119240 WO2019109922A1 (zh) 2017-12-08 2018-12-04 资源处理方法及系统、存储介质、电子设备

Country Status (6)

Country Link
US (1) US11228537B2 (zh)
EP (1) EP3723343B1 (zh)
JP (1) JP7313351B2 (zh)
KR (1) KR102601628B1 (zh)
CN (1) CN109905435A (zh)
WO (1) WO2019109922A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925851A (zh) * 2021-02-26 2021-06-08 杭州网易再顾科技有限公司 一种单号处理方法、装置、电子设备和存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220103617A (ko) * 2021-01-15 2022-07-22 현대자동차주식회사 M2m 시스템에서 구독 서비스를 관리하기 위한 방법 및 장치
CN117453665A (zh) * 2023-10-09 2024-01-26 行吟信息科技(上海)有限公司 一种数据处理方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056308A (zh) * 2009-11-02 2011-05-11 株式会社Ntt都科摩 资源分配方法及装置
CN103593408A (zh) * 2013-10-18 2014-02-19 卓易畅游(北京)科技有限公司 一种用于获取用户订阅资源的方法与设备
US9554410B2 (en) * 2014-03-14 2017-01-24 Institute For Information Industry Device-to-device user equipment for a wireless communication system and resource scheduling method thereof
CN107357663A (zh) * 2017-07-24 2017-11-17 中国联合网络通信集团有限公司 资源共享的方法及资源管理器

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8374879B2 (en) * 2002-02-04 2013-02-12 Microsoft Corporation Systems and methods for managing interactions from multiple speech-enabled applications
CN1801813B (zh) * 2005-09-30 2010-05-05 华为技术有限公司 一种动态内容播放方法与装置
CN102573085A (zh) * 2007-03-01 2012-07-11 株式会社Ntt都科摩 基站装置
RU2009134935A (ru) * 2007-03-01 2011-04-10 НТТ ДоСоМо, Инк. (JP) Базовая станция и способ управления связью
US20120327778A1 (en) * 2011-06-22 2012-12-27 Cygnus Broadband, Inc. Systems and methods for prioritizing and scheduling packets in a communication network
JP5244831B2 (ja) 2010-01-25 2013-07-24 株式会社日立製作所 計算機システム及びストレージ統合管理方法
JP2013200645A (ja) * 2012-03-23 2013-10-03 Nec Corp サーバ、通信システム、通信方法
JP5827594B2 (ja) * 2012-05-17 2015-12-02 日本電信電話株式会社 仮想マシン配置装置および仮想マシン配置方法
CN103365711B (zh) * 2013-07-03 2017-06-30 南京邮电大学 应用于物联网业务平台的任务调度系统和方法
JP5884788B2 (ja) * 2013-08-08 2016-03-15 株式会社デンソー マイクロコンピュータ
US20160366183A1 (en) * 2015-06-09 2016-12-15 Ned M. Smith System, Apparatus And Method For Access Control List Processing In A Constrained Environment
US10382904B2 (en) * 2015-06-29 2019-08-13 Samsung Electronics Co., Ltd. Method and apparatus for providing service in a wireless communication system
JP6477430B2 (ja) * 2015-11-10 2019-03-06 株式会社デンソー 電子制御装置
US10455452B2 (en) * 2015-12-14 2019-10-22 Afero, Inc. System and method for flow control in an internet of things (IoT) system
CN106897125A (zh) * 2015-12-18 2017-06-27 联发科技(新加坡)私人有限公司 智能设备及其服务或应用的管理方法
JP2017208660A (ja) * 2016-05-17 2017-11-24 富士通株式会社 情報処理装置、管理方法及び情報処理プログラム
CN107203395A (zh) * 2017-05-19 2017-09-26 北京京东尚科信息技术有限公司 资源升级方法、装置及计算机可读存储介质和电子设备
US10298505B1 (en) * 2017-11-20 2019-05-21 International Business Machines Corporation Data congestion control in hierarchical sensor networks

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056308A (zh) * 2009-11-02 2011-05-11 株式会社Ntt都科摩 资源分配方法及装置
CN103593408A (zh) * 2013-10-18 2014-02-19 卓易畅游(北京)科技有限公司 一种用于获取用户订阅资源的方法与设备
US9554410B2 (en) * 2014-03-14 2017-01-24 Institute For Information Industry Device-to-device user equipment for a wireless communication system and resource scheduling method thereof
CN107357663A (zh) * 2017-07-24 2017-11-17 中国联合网络通信集团有限公司 资源共享的方法及资源管理器

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3723343A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925851A (zh) * 2021-02-26 2021-06-08 杭州网易再顾科技有限公司 一种单号处理方法、装置、电子设备和存储介质
CN112925851B (zh) * 2021-02-26 2023-06-13 杭州网易再顾科技有限公司 一种单号处理方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
KR20200091917A (ko) 2020-07-31
EP3723343B1 (en) 2024-03-13
EP3723343A1 (en) 2020-10-14
JP7313351B2 (ja) 2023-07-24
US11228537B2 (en) 2022-01-18
CN109905435A (zh) 2019-06-18
KR102601628B1 (ko) 2023-11-14
EP3723343A4 (en) 2021-08-18
US20210176186A1 (en) 2021-06-10
JP2021506002A (ja) 2021-02-18

Similar Documents

Publication Publication Date Title
JP6750102B2 (ja) マネージクエリサービス
CN107590001B (zh) 负载均衡方法及装置、存储介质、电子设备
JP6325001B2 (ja) 階層データ構造のノードにおいて再帰的イベントリスナを用いる方法およびシステム
US9813423B2 (en) Trust-based computing resource authorization in a networked computing environment
WO2019109923A1 (zh) 消息处理方法及系统、存储介质、电子设备
CN109844727B (zh) 用于管理应用程序配置和相关联凭证的技术
TW201820165A (zh) 用於雲端巨量資料運算架構之伺服器及其雲端運算資源最佳化方法
US20110119444A1 (en) Adaptive caching of data
WO2019109922A1 (zh) 资源处理方法及系统、存储介质、电子设备
WO2021022710A1 (zh) 消息队列处理方法、装置、电子设备及计算机非易失性可读存储介质
JP2023548405A (ja) クラスタコンピューティング環境を修正するための技術
WO2022257604A1 (zh) 一种用户标签的确定方法和装置
US9906604B2 (en) System and method for dynamic discovery of web services for a management console
CN109948332A (zh) 一种物理机登录密码重置方法及装置
WO2018188607A1 (zh) 流处理方法及装置
WO2017114241A1 (zh) 一种获取资源的方法和装置
WO2024051195A1 (zh) 数据调用方法、装置、服务网关及存储介质
US10616317B2 (en) Method and system for affinity load balancing
JP6515052B2 (ja) 通信装置、通信システム、通信方法およびプログラム
WO2020220272A1 (zh) 更改资源状态的方法、系统、终端及存储介质
WO2024041081A1 (zh) 数据处理方法、装置、设备及可读存储介质
US20230034196A1 (en) Techniques for providing synchronous and asynchronous data processing
US20200028769A1 (en) Efficient heartbeat with remote servers by nas cluster nodes
CN114500485A (zh) 一种数据处理方法和装置
CN111415262A (zh) 一种业务处理方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18885631

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020530578

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20207019608

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2018885631

Country of ref document: EP

Effective date: 20200708