CN110716916A - Resource online management method and device, computer equipment and storage medium - Google Patents

Resource online management method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110716916A
CN110716916A CN201910823567.1A CN201910823567A CN110716916A CN 110716916 A CN110716916 A CN 110716916A CN 201910823567 A CN201910823567 A CN 201910823567A CN 110716916 A CN110716916 A CN 110716916A
Authority
CN
China
Prior art keywords
resource
metering
information
event
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910823567.1A
Other languages
Chinese (zh)
Inventor
刘兵舰
常明华
陶勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910823567.1A priority Critical patent/CN110716916A/en
Publication of CN110716916A publication Critical patent/CN110716916A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a resource management method and device based on a database technology, a computer device and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining resources to be managed, extracting preset information of the resources to obtain resource information, generating a resource information list in a resource database according to the resource information, pushing the resource updating event to a node corresponding to a cache queue of the resource database when the resource updating event is detected, polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resources. The method can improve the efficiency of resource management.

Description

Resource online management method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for resource online management, a computer device, and a storage medium.
Background
With the development of computer technology, the center of gravity of the transaction pattern of the resource gradually inclines towards the online transaction. When the online transaction is carried out, the salesperson explains the attributes of all aspects of the resources in detail, so that the purchasing desire of the user is aroused. When the transaction mode is inclined on line, resources are more widely oriented to a plurality of users, and at the moment, the functions of the salespersons are greatly reduced, so that how to make a better case can increase the influence of the resources in the network.
However, as the online transaction scale is larger and larger, the resource types and channels are more and more, and at the time of a peak transaction, the background pressure of the transaction system is higher, so that the situation of transaction information congestion is easy to occur, and online management of resources is not facilitated.
Disclosure of Invention
In view of the above, it is necessary to provide a resource online management method, device, computer device, and storage medium that can solve the problem of inefficient online resource management.
A method of online management of resources, the method comprising:
acquiring resources to be managed;
extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
when a resource updating event is detected, pushing the resource updating event to a node corresponding to a cache queue of the resource database;
polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
In one embodiment, the resource information form includes: a resource attribute form, a metering form and a channel metering form; further comprising: establishing the resource attribute form in a preset resource database according to the resource attribute in the resource information; establishing the metering form in the resource database according to the resource attribute and the resource metering information in the resource information; and establishing the channel metering form in the resource database according to the resource attributes and the channel statistical information in the resource information.
In one embodiment, the method further comprises the following steps: establishing data interaction logic of the resource database and a front-end display interface; the data interaction logic is logic for extracting specified data from the data database and displaying the data at a specified position of a front-end display interface; and displaying the information contained in the resource attribute form, the metering form and the channel metering form in the front-end display interface according to the data interaction logic.
In one embodiment, the update event comprises: a resource attribute update event and a metering information update event; further comprising: when the update event is a resource attribute update event, analyzing the resource attribute update event to obtain an attribute field to be updated; setting a corresponding database modification statement according to the attribute field, and executing the database modification statement in the resource database to update and manage the attribute field, wherein the resource attribute form, the metering form and the channel metering form all contain the attribute field; when the updating event is a metering information updating event, analyzing the metering information updating event to obtain a metering field to be updated and modified content; the metering form comprises the metering field; setting a corresponding database updating statement according to the modified content and the metering field, executing the database updating statement in the resource database to update and manage the metering field of the metering form, and updating and managing the channel metering field of the channel metering form in the resource database according to the logical relationship between the channel metering field and the metering field contained in the channel metering form; wherein the content of the metering field is obtained by summing the content of the channel metering field.
In one embodiment, the method further comprises the following steps: detecting a resource updating instruction sent by a user front end at fixed time according to a preset timing process; when the resource updating instruction is detected, generating a resource updating event according to the resource updating instruction; acquiring a key time point according to a current event, and pushing the resource updating event to a node corresponding to a cache queue of the resource database according to the key time point; the nodes are time nodes, and the cache queue is composed of a plurality of the nodes arranged according to a time sequence.
In one embodiment, the method further comprises the following steps: starting a concurrent transaction lock arranged in the cache queue, and setting a polling mode of the cache queue as a dead cycle; and taking out the nodes from the cache queue in a circulating mode according to the sequence of the nodes in the cache queue.
In one embodiment, the resource information form further includes: a resource heat form; further comprising: generating the resource heat degree form in the resource database according to the resource attribute and the heat degree field; when detecting that a user clicks a resource event on the front-end display interface, pushing the resource clicking event to the cache queue; opening a data lock set in the resource database to obtain a data synchronization authority; synchronizing the resource clicking event to the resource database through the data synchronization authority; and updating and managing the hot degree field of the resource hot degree form of the resource database according to the resource clicking event.
An online resource management device, the device comprising:
the information acquisition module is used for acquiring resources to be managed;
the form establishing module is used for extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
the cache queue module is used for pushing the resource updating event to a node corresponding to a cache queue of the resource database when the resource updating event is detected;
and the management module is used for polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring resources to be managed;
extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
when a resource updating event is detected, pushing the resource updating event to a node corresponding to a cache queue of the resource database;
polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring resources to be managed;
extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
when a resource updating event is detected, pushing the resource updating event to a node corresponding to a cache queue of the resource database;
polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
According to the resource online management method, the resource online management device, the computer equipment and the storage medium, the resource management information of the resource is acquired, and then the resource information form corresponding to the resource is generated in the resource database according to the resource management information, so that the resource is digitalized, the data volume is reduced, and when a large amount of databases exist, the resource information form can be quickly modified and updated through the data management function of the databases. On the other hand, when the resource is detected to be required to be updated, the resource updating event is pushed to the buffer queue, and the buffer queue mechanism can be used for orderly pushing the corresponding resource updating event to the resource database in response to the problem that the resource updating event reaches the peak value. The embodiment of the invention can improve the efficiency of on-line management of resources.
Drawings
FIG. 1 is a diagram of an application scenario of a resource management method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for resource management in one embodiment;
FIG. 3 is a flowchart illustrating the steps of performing update management on a resource information form in one embodiment;
FIG. 4 is a flowchart illustrating the step of pushing resource update events to the buffer queue in one embodiment;
FIG. 5 is a block diagram of an embodiment of a resource management device;
FIG. 6 is a diagram illustrating an internal structure 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 online management method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In addition, when the terminal 102 communicates with the server 104, a user performs a specified operation in the terminal 102, and the server 104 may generate a corresponding database modification instruction according to the specified operation, thereby completing modification of resource data in the resource database, and thus implementing management of resources.
In a specific application scenario, the terminal 102 is a smart phone, a resource display application is deployed in the smart phone, and a user establishes a connection with the server 104 when running the resource display application through the terminal 102, so that resources in a resource database can be displayed on a display interface of the smart phone. On the other hand, the server 104 acquires resource management information of the resource in advance, and then generates a resource information form corresponding to the resource in the resource database according to the resource management information. When a user operates a resource in a display interface, the server 104 detects a resource update event, then pushes the resource update event to a cache queue of a resource database, and takes out the resource update event from a node in a cache queue polling manner to perform update management on a resource information form.
In one embodiment, as shown in fig. 2, a resource online management method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step 202, acquiring the resource to be managed.
The resource can be a product, a commodity and the like, and the acquisition of the resource to be managed can be the reception of information of the resource uploaded by a user, or the crawling of the server from the internet.
And step 204, extracting preset information from the resources to obtain resource information, and generating a resource information form in the resource database according to the resource information.
The preset information refers to a source name, a resource ID, a resource shelf life, the total number of resources in a warehouse and the like, can be set according to the requirements of users, and the extraction refers to extracting specific fields after classifying the information in the resources.
The resource database is one of databases corresponding to the server and used for storing information of various resources, the information of the resources is stored in the resource database in the form of a resource information form, and if a large number of resource information forms can be established in the resource database, the resource database can meet the requirements of management of various different resources.
When a resource information form is generated in a resource database, fields in the resource information form need to be determined according to resource management information, for example, resource names are included in the resource management information, so that when the resource information form is generated, resource name fields need to be established, and a resource information form corresponding to resources can be formed through a plurality of fields. In addition, different resource information forms can be generated by combining the resource management information, so that the diversity management of resources is realized.
Step 206, when the resource update event is detected, pushing the resource update event to a node corresponding to a cache queue of the resource database.
The resource update event is generated according to an instruction for modifying the resource database, and the resource update event may be generated by the user terminal, for example: the resource updating information may also be generated by the server itself, for example, by the purchasing behavior of the user on the commodity: the server is generated when the information maintenance is carried out on the resources. Therefore, when modification of the resource database is involved, the modification instruction needs to be processed by the server to generate a resource update event, so that on one hand, the safety of data in the resource database can be improved, on the other hand, the data in the resource database can be updated orderly, and the efficiency of resource management is improved.
The buffer queue is realized by a buffer, a buffer area is defined in the buffer, and the buffer queue is formed in a node mode, so that the buffer queue is formed. The buffer queue logically follows this first-in-first-out principle.
After detecting a resource update event, the server pushes the resource update event to the cache queue, that is, the resource update event is a node in the cache queue, and the node includes time information.
And 208, polling the cache queue, and pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
Polling refers to performing polling in a certain order, and in this step, polling is performed in the order of queues in the buffer queue.
The node meeting the preset time condition means that the time condition is preset in the server, for example, the value obtained by subtraction is less than 5, and the time condition can be designed according to the specific requirements of the server and is not limited to the value of 5. In addition, when the node does not satisfy the preset time condition, the resource update event needs to be pushed to the cache queue again according to the sequence of the cache time sequence.
Update management refers to the resource database that is retrieved after maintenance update is performed on the resource database.
In the resource online management method, the resource management information of the resources is acquired, and then the resource information form corresponding to the resources is generated in the resource database according to the resource management information, so that the resources are digitalized, the data volume is reduced, and when a large number of databases exist, the resource information form can be modified and updated rapidly through the data management function of the databases. On the other hand, when the resource is detected to be required to be updated, the resource updating event is pushed to the buffer queue, and the buffer queue mechanism can be used for orderly pushing the corresponding resource updating event to the resource database in response to the problem that the resource updating event reaches the peak value. The embodiment of the invention can improve the efficiency of on-line management of resources.
In one embodiment, the resource information form comprises: the resource attribute form, the measurement form and the channel measurement form are all established through resource management information, and in action, the resource attribute form is used for recording basic information of resources, such as: resource name, resource ID, production date, expiration date, etc. Metering forms are used to record sales of resources, such as: the monthly sales volume, the sales status and the like, because the resource quantity in the resource database is huge, the fields in the resource attribute form are also included in the metering form, so that the metering form corresponds to the resource attribute form. The channel metering form is used to record channel conditions of resources, such as: a total number of resources field, a channel guarantee deadline field, etc. From the above, it is obvious that when the resource attribute form is modified, the metering form and the channel metering form also need to be modified, and when the metering form is updated, the channel metering form also needs to be updated.
Specifically, when each form is generated, a resource attribute form is established in a preset resource database according to the resource attribute in the resource information, a metering form is established in the resource database according to the resource attribute and the resource metering information in the resource information, and a channel metering form is established in the resource database according to the resource attribute and the channel statistical information in the resource information. In this embodiment, the resource attribute refers to inherent information of the resource, and the inherent information of the resource may be modified by the server. The resource metering information refers to information for counting resources, for example: it should be noted that, for the same commodity, sales can be performed in different channels, and therefore, the resource attribute form may correspond to a plurality of channel measurement forms, but the measurement form corresponds to only one channel measurement form. Therefore, through the resource information form in the resource database, multi-channel sale and statistical management of resources in the same platform can be realized.
In one embodiment, the server establishes data interaction logic between the resource database and the front-end display interface, the data interaction logic is logic for extracting specified data from the resource database and displaying the specified data at a specified position of the front-end display interface, and information contained in the resource attribute form, the metering form and the channel metering form is displayed in the front-end display interface according to the data interaction logic.
Specifically, the data interaction logic is a section of program function, and when the program function is executed, data of a specified field is extracted from a resource database and is displayed at a specified position on a front-end display interface, wherein the specified position also refers to a stacking mode, a placing mode and the like of different information. Therefore, through the data support of the resource database, various information of the resources is displayed on the front-end display interface, wherein the information includes the information of the resource attribute form and also includes the information in the metering form and the channel metering form, and the user can conveniently check the information.
In an embodiment, the resource update event may be a resource attribute update event and a metering information update event, and the following further describes, taking the resource attribute update event as an example, as shown in fig. 3, a schematic flowchart of a step of performing update management on a resource information form is provided, and the specific steps are as follows:
step 302, analyzing the resource attribute updating event to obtain the attribute field to be updated.
The attribute field to be updated refers to a position needing to be updated, and the server can determine the attribute field to be updated by analyzing the resource attribute updating event.
And 304, executing the database modification statement in the resource database to update and manage the attribute field according to the attribute field and the corresponding database modification statement.
In this embodiment, the resource attribute form, the metering form, and the channel metering form all include attribute fields, and therefore, all forms including attribute fields need to be modified, and when a specified field is modified, a statement can be modified by setting a database for modifying the field content, and the modification of the form is realized by executing the statement.
On the other hand, when the resource updating event is a metering information updating event, analyzing the metering information updating event to obtain a metering field to be updated and a modified content; the metering form comprises a metering field; and setting a corresponding database updating statement according to the modified content and the metering field, executing the database updating statement in the resource database to update and manage the metering field of the metering form, and updating and managing the channel metering field of the channel metering form in the resource database according to the logical relationship between the channel metering field and the metering field contained in the channel metering form. In the scheme, because the corresponding relation between the metering form and the channel metering form is set, after the metering form is updated and managed, the channel metering form also needs to be updated and managed correspondingly; wherein the content of the metering field is obtained by summing the content of the channel metering field. In this embodiment, for the same resource, a logical connection between the metering form and the channel metering form needs to be established, where the metering form is used to record the whole information of the resource, and the channel metering form is used to record the information of the resource in each channel, so that the content of the metering field is obtained by summing the content of the channel metering field.
In an embodiment, as shown in fig. 4, an exemplary flowchart of the step of pushing the resource update event to the buffer queue is provided, and the specific steps are as follows:
step 402, detecting a resource updating instruction sent by a user front end at regular time according to a preset timing process.
The timing process is a program set in the server and can execute and complete the designated task at regular time.
Step 404, when a resource updating instruction is detected, a resource updating event is generated according to the resource updating instruction.
After the server obtains the resource updating instruction, a resource updating event can be correspondingly generated.
And 406, acquiring a key time point according to the current time, and pushing the resource updating event to a node corresponding to a cache queue of the resource database according to the key time point.
The key time point is preset in the cache queue, and the key time point can be obtained according to the current time, so that the resource updating time is pushed to the node corresponding to the cache queue of the resource database.
In this embodiment, after the resource update instruction is detected, the resource update instruction needs to be detected first, so as to be converted into a resource update event, and in essence, the resource update event includes an instruction for modifying the database, and then the database is modified in order in the cache queue.
In one embodiment, a concurrent transaction lock is set in the cache queue to lock the data. Then, the polling mode of the buffer queue is set as dead cycle, so that the nodes in the buffer queue are polled for multiple times, and then the nodes are taken out from the buffer queue in a cyclic mode according to the sequence of the nodes in the buffer queue. In this embodiment, when performing polling, the server takes out the node from the cache queue, and therefore, when the node does not satisfy the time condition, because the polling manner is a dead cycle, the node that does not satisfy the condition is pushed to the cache queue again.
In summary, since the resource update event needs to be pushed to the cache queue, for the resource database, the triggering manner of the resource update event belongs to asynchronous triggering, and the asynchronous triggering has an advantage of improving the throughput capability of the system, thereby improving the efficiency of resource online management.
In addition, in an embodiment, the database may further receive a synchronization trigger instruction, and specifically, the resource information form further includes a resource heat degree form, where the resource heat degree form is used to count heat degree conditions of resources, a measure of the heat degree is a click rate, and a user clicks the resource once to perform an operation of heat degree + 1.
Specifically, when the resource heat degree form is established, the resource heat degree form is generated in the resource database according to the resource attribute and the heat degree field. When detecting that a user clicks a resource event on a front-end display interface, pushing the clicked resource event to a cache queue, opening a data lock set in a resource database to obtain a data synchronization authority, synchronizing the clicked resource event to the resource database through the data synchronization authority, and updating and managing a heat field in a resource heat form of the resource database according to the clicked resource event. In this embodiment, during the update of the heat, because the requirement on real-time performance is high, the resource database is modified in a synchronous triggering manner, and on the other hand, in order to enable synchronous triggering and asynchronous triggering to exist in the server at the same time, by setting a data lock, when asynchronous triggering is required, the data lock is closed, asynchronous triggering is performed, when synchronous triggering is required, the data lock is opened, synchronous triggering is performed, and thus two triggering manners exist in the resource database at the same time.
Additionally, in an embodiment, the buffer queue may be disposed in a Redis buffer.
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, there is provided a resource online management apparatus, including: an information acquisition module 502, a form creation module 504, a cache queue module 506, and a management module 508, wherein:
an information obtaining module 502, configured to obtain a resource to be managed.
The form establishing module 504 is configured to extract preset information from the resource to obtain resource information, and generate a resource information form in a resource database according to the resource information.
The buffer queue module 506 is configured to, when a resource update event is detected, push the resource update event to a node corresponding to a buffer queue of the resource database.
A management module 508, configured to poll the cache queue, and when the node meets a preset time condition, push the resource update event out of the cache queue, and execute the resource update event to perform update management on the resource.
In one embodiment, the resource information form includes: a resource attribute form, a metering form and a channel metering form; the form establishing module 504 is further configured to establish the resource attribute form in a preset resource database according to the resource attribute in the resource information; establishing the metering form in the resource database according to the resource attribute and the resource metering information in the resource information; and establishing the channel metering form in the resource database according to the resource attributes and the channel statistical information in the resource information.
In one embodiment, the system further comprises a display module, configured to establish a data interaction logic between the resource database and the front-end display interface, where the data interaction logic is a logic that extracts specified data from the resource database and displays the data at a specified position of the front-end display interface; and displaying the information contained in the resource attribute form, the metering form and the channel metering form in the front-end display interface according to the data interaction logic.
In one embodiment, the resource update event includes: a resource attribute update event and a metering information update event; the management module 508 is further configured to, when the resource update event is a resource attribute update event, parse the resource attribute update event to obtain an attribute field to be updated; setting a corresponding database modification statement according to the attribute field, and executing the database modification statement in the resource database to update and manage the attribute field, wherein the resource attribute form, the metering form and the channel metering form all contain the attribute field; when the resource updating event is a metering information updating event, analyzing the metering information updating event to obtain a metering field to be updated and modification content; the metering form comprises the metering field; setting a corresponding database updating statement according to the modified content and the metering field, executing the database updating statement in the resource database to update and manage the metering field of the metering form, and updating and managing the channel metering field of the channel metering form in the resource database according to the logical relationship between the channel metering field and the metering field contained in the channel metering form; wherein the content of the metering field is obtained by summing the content of the channel metering field.
In one embodiment, the buffer queue module 506 is further configured to detect a resource update instruction sent by the user front end in a timing manner according to a preset timing process; when the resource updating instruction is detected, generating a resource updating event according to the resource updating instruction; acquiring a key time point according to the current time, and pushing the resource updating event to a node corresponding to a cache queue of the resource database according to the key time point; the nodes are time nodes, and the cache queue is composed of a plurality of the nodes arranged according to a time sequence.
In one embodiment, the management module 508 is further configured to start a concurrent transaction lock set in the cache queue, and set a polling manner of the cache queue as a dead loop; and taking out the nodes from the cache queue in a circulating mode according to the sequence of the nodes in the cache queue.
In one embodiment, the resource information form further includes: a resource heat form; the system also comprises a heat management module used for generating the resource heat form in the resource database according to the resource attribute and the heat field; when detecting that a user clicks a resource event on the front-end display interface, pushing the resource clicking event to the cache queue; opening a data lock set in the resource database to obtain a data synchronization authority; synchronizing the resource clicking event to the resource database through the data synchronization authority; and updating and managing the heat field in the resource heat form of the resource database according to the resource clicking event.
For the specific limitation of the resource online management device, reference may be made to the above limitation of the resource online management method, which is not described herein again. The modules in the resource online management device can be wholly or partially implemented 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 its internal structure diagram may be as shown in fig. 6. 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 information form 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 method for online management of resources.
Those skilled in the art will appreciate that the architecture shown in fig. 6 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, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program:
acquiring resources to be managed;
extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
when a resource updating event is detected, pushing the resource updating event to a node corresponding to a cache queue of the resource database;
polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
In one embodiment, the resource information form includes: a resource attribute form, a metering form and a channel metering form; the processor, when executing the computer program, further performs the steps of: establishing the resource attribute form in a preset resource database according to the resource attribute in the resource information; establishing the metering form in the resource database according to the resource attribute and the resource metering information in the resource information; and establishing the channel metering form in the resource database according to the resource attributes and the channel statistical information in the resource information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: establishing data interaction logic of the resource database and a front-end display interface, wherein the data interaction logic is logic for extracting specified data from the resource database and displaying the specified data at a specified position of the front-end display interface; and displaying the information contained in the resource attribute form, the metering form and the channel metering form in the front-end display interface according to the data interaction logic.
In one embodiment, the resource update event comprises: a resource attribute update event and a metering information update event; the processor, when executing the computer program, further performs the steps of: when the resource updating event is a resource attribute updating event, analyzing the resource attribute updating event to obtain an attribute field to be updated; setting a corresponding database modification statement according to the attribute field, and executing the database modification statement in the resource database to update and manage the attribute field, wherein the resource attribute form, the metering form and the channel metering form all contain the attribute field; when the resource updating event is a metering information updating event, analyzing the metering information updating event to obtain a metering field to be updated and modification content; the metering form comprises the metering field; setting a corresponding database updating statement according to the modified content and the metering field, executing the database updating statement in the resource database to update and manage the metering field of the metering form, and updating and managing the channel metering field of the channel metering form in the resource database according to the logical relationship between the channel metering field and the metering field contained in the channel metering form; wherein the content of the metering field is obtained by summing the content of the channel metering field.
In one embodiment, the processor, when executing the computer program, further performs the steps of: detecting a resource updating instruction sent by a user front end at fixed time according to a preset timing process; when the resource updating instruction is detected, generating a resource updating event according to the resource updating instruction; acquiring a key time point according to the current time, and pushing the resource updating event to a node corresponding to a cache queue of the resource database according to the key time point; the nodes are time nodes, and the cache queue is composed of a plurality of the nodes arranged according to a time sequence.
In one embodiment, the processor, when executing the computer program, further performs the steps of: starting a concurrent transaction lock arranged in the cache queue, and setting a polling mode of the cache queue as a dead cycle; and taking out the nodes from the cache queue in a circulating mode according to the sequence of the nodes in the cache queue.
In one embodiment, the resource information form further comprises: a resource heat form; the processor, when executing the computer program, further performs the steps of: generating the resource heat degree form in the resource database according to the resource attribute and the heat degree field; when detecting that a user clicks a resource event on the front-end display interface, pushing the resource clicking event to the cache queue; opening a data lock set in the resource database to obtain a data synchronization authority; synchronizing the resource clicking event to the resource database through the data synchronization authority; and updating and managing the heat field in the resource heat form of the resource database according to the resource clicking event.
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:
acquiring resources to be managed;
extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
when a resource updating event is detected, pushing the resource updating event to a node corresponding to a cache queue of the resource database;
polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
In one embodiment, the resource information form includes: a resource attribute form, a metering form and a channel metering form; the computer program when executed by the processor further realizes the steps of: establishing the resource attribute form in a preset resource database according to the resource attribute in the resource information; establishing the metering form in the resource database according to the resource attribute and the resource metering information in the resource information; and establishing the channel metering form in the resource database according to the resource attributes and the channel statistical information in the resource information.
In one embodiment, the computer program when executed by the processor further performs the steps of: establishing data interaction logic of the resource database and a front-end display interface, wherein the data interaction logic is logic for extracting specified data from the resource database and displaying the specified data at a specified position of the front-end display interface; and displaying the information contained in the resource attribute form, the metering form and the channel metering form in the front-end display interface according to the data interaction logic.
In one embodiment, the resource update event comprises: a resource attribute update event and a metering information update event; the computer program when executed by the processor further realizes the steps of: when the resource updating event is a resource attribute updating event, analyzing the resource attribute updating event to obtain an attribute field to be updated; setting a corresponding database modification statement according to the attribute field, and executing the database modification statement in the resource database to update and manage the attribute field, wherein the resource attribute form, the metering form and the channel metering form all contain the attribute field; when the resource updating event is a metering information updating event, analyzing the metering information updating event to obtain a metering field to be updated and modification content; the metering form comprises the metering field; setting a corresponding database updating statement according to the modified content and the metering field, executing the database updating statement in the resource database to update and manage the metering field of the metering form, and updating and managing the channel metering field of the channel metering form in the resource database according to the logical relationship between the channel metering field and the metering field contained in the channel metering form; wherein the content of the metering field is obtained by summing the content of the channel metering field.
In one embodiment, the computer program when executed by the processor further performs the steps of: detecting a resource updating instruction sent by a user front end at fixed time according to a preset timing process; when the resource updating instruction is detected, generating a resource updating event according to the resource updating instruction; acquiring a key time point according to the current time, and pushing the resource updating event to a node corresponding to a cache queue of the resource database according to the key time point; the nodes are time nodes, and the cache queue is composed of a plurality of the nodes arranged according to a time sequence.
In one embodiment, the computer program when executed by the processor further performs the steps of: starting a concurrent transaction lock arranged in the cache queue, and setting a polling mode of the cache queue as a dead cycle; and taking out the nodes from the cache queue in a circulating mode according to the sequence of the nodes in the cache queue.
In one embodiment, the computer program when executed by the processor further performs the steps of: the processor, when executing the computer program, further performs the steps of: generating the resource heat degree form in the resource database according to the resource attribute and the heat degree field; when detecting that a user clicks a resource event on the front-end display interface, pushing the resource clicking event to the cache queue; opening a data lock set in the resource database to obtain a data synchronization authority; synchronizing the resource clicking event to the resource database through the data synchronization authority; and updating and managing the heat field in the resource heat form of the resource database according to the resource clicking event.
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 of resource management, the method comprising:
acquiring resources to be managed;
extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
when a resource updating event is detected, pushing the resource updating event to a node corresponding to a cache queue of the resource database;
polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
2. The method of claim 1, wherein the resource information form comprises: a resource attribute form, a metering form and a channel metering form;
the resource information form in the resource database generated according to the resource information comprises:
establishing the resource attribute form in a preset resource database according to the resource attribute in the resource information;
establishing the metering form in the resource database according to the resource attribute and the resource metering information in the resource information;
and establishing the channel metering form in the resource database according to the resource attributes and the channel statistical information in the resource information.
3. The method of claim 2, further comprising:
establishing data interaction logic of the resource database and a front-end display interface; the data interaction logic is logic for extracting specified data from the resource database and displaying the data at a specified position of a front-end display interface;
and displaying the information contained in the resource attribute form, the metering form and the channel metering form in the front-end display interface according to the data interaction logic.
4. The method of claim 2, wherein the resource update event comprises: a resource attribute update event and a metering information update event;
executing the resource updating event to perform updating management on the resource, wherein the updating management comprises the following steps:
when the resource updating event is a resource attribute updating event, analyzing the resource attribute updating event to obtain an attribute field to be updated;
setting a corresponding database modification statement according to the attribute field, and executing the database modification statement in the resource database to update and manage the attribute field, wherein the resource attribute form, the metering form and the channel metering form all contain the attribute field;
when the resource updating event is a metering information updating event, analyzing the metering information updating event to obtain a metering field to be updated and modification content; the metering form comprises the metering field;
setting a corresponding database updating statement according to the modified content and the metering field, executing the database updating statement in the resource database to update and manage the metering field of the metering form, and updating and managing the channel metering field of the channel metering form in the resource database according to the logical relationship between the channel metering field and the metering field contained in the channel metering form; wherein the content of the metering field is obtained by summing the content of the channel metering field.
5. The method according to any one of claims 1 to 4, wherein when a resource update event is detected, pushing the resource update event to a node corresponding to a cache queue of the resource database comprises:
detecting a resource updating instruction sent by a user front end at fixed time according to a preset timing process;
when the resource updating instruction is detected, generating a resource updating event according to the resource updating instruction;
acquiring a key time point according to the current time, and pushing the resource updating event to a node corresponding to a cache queue of the resource database according to the key time point; the nodes are time nodes, and the cache queue is composed of a plurality of the nodes arranged according to a time sequence.
6. The method of any of claims 1 to 4, wherein polling the buffer queue comprises:
starting a concurrent transaction lock arranged in the cache queue, and setting a polling mode of the cache queue as a dead cycle;
and taking out the nodes from the cache queue in a circulating mode according to the sequence of the nodes in the cache queue.
7. The method of claim 3, wherein the resource information form further comprises: a resource heat form;
the method further comprises the following steps:
generating the resource heat degree form in the resource database according to the resource attribute and the heat degree field;
when detecting that a user clicks a resource event on the front-end display interface, pushing the resource clicking event to the cache queue;
opening a data lock set in the resource database to obtain a data synchronization authority;
synchronizing the resource clicking event to the resource database through the data synchronization authority;
and updating and managing the heat field in the resource heat form of the resource database according to the resource clicking event.
8. An online resource management apparatus, the apparatus comprising:
the information acquisition module is used for acquiring resources to be managed;
the form establishing module is used for extracting preset information from the resources to obtain resource information, and generating a resource information form in a resource database according to the resource information;
the cache queue module is used for pushing the resource updating event to a node corresponding to a cache queue of the resource database when the resource updating event is detected;
and the management module is used for polling the cache queue, pushing the resource updating event out of the cache queue when the node meets a preset time condition, and executing the resource updating event to update and manage the resource.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
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 7.
CN201910823567.1A 2019-09-02 2019-09-02 Resource online management method and device, computer equipment and storage medium Pending CN110716916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910823567.1A CN110716916A (en) 2019-09-02 2019-09-02 Resource online management method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910823567.1A CN110716916A (en) 2019-09-02 2019-09-02 Resource online management method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110716916A true CN110716916A (en) 2020-01-21

Family

ID=69210205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910823567.1A Pending CN110716916A (en) 2019-09-02 2019-09-02 Resource online management method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110716916A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414259A (en) * 2020-02-10 2020-07-14 北京声智科技有限公司 Resource updating method, system, device, server and storage medium
CN111694857A (en) * 2020-06-12 2020-09-22 北京百度网讯科技有限公司 Method and device for storing resource data, electronic equipment and computer readable medium
CN113377371A (en) * 2021-06-02 2021-09-10 五八到家有限公司 Multi-scene configuration method, system, device and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102154A1 (en) * 2003-11-12 2005-05-12 Dodd Ryan A. Method, computer useable medium, and system for enterprise resource management
CN102222071A (en) * 2010-04-16 2011-10-19 华为技术有限公司 Method, device and system for data synchronous processing
WO2017206587A1 (en) * 2016-05-30 2017-12-07 中兴通讯股份有限公司 Method and device for scheduling priority queue
CN109543086A (en) * 2018-11-23 2019-03-29 北京信息科技大学 A kind of network data acquisition and methods of exhibiting towards multi-data source
CN109597818A (en) * 2018-11-28 2019-04-09 优刻得科技股份有限公司 Data-updating method, device, storage medium and equipment
CN110189189A (en) * 2019-04-19 2019-08-30 平安科技(深圳)有限公司 One-stop shopping at network bootstrap technique, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102154A1 (en) * 2003-11-12 2005-05-12 Dodd Ryan A. Method, computer useable medium, and system for enterprise resource management
CN102222071A (en) * 2010-04-16 2011-10-19 华为技术有限公司 Method, device and system for data synchronous processing
WO2017206587A1 (en) * 2016-05-30 2017-12-07 中兴通讯股份有限公司 Method and device for scheduling priority queue
CN109543086A (en) * 2018-11-23 2019-03-29 北京信息科技大学 A kind of network data acquisition and methods of exhibiting towards multi-data source
CN109597818A (en) * 2018-11-28 2019-04-09 优刻得科技股份有限公司 Data-updating method, device, storage medium and equipment
CN110189189A (en) * 2019-04-19 2019-08-30 平安科技(深圳)有限公司 One-stop shopping at network bootstrap technique, device, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
S. ADALI 等: "Query caching and optimization in distributed mediator systems", SIGMOD \'96: PROCEEDINGS OF THE 1996 ACM SIGMOD INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA, pages 137 *
胡四元;: "图书馆WEB资源访问量统计分析系统技术实现", 高校图书馆工作, no. 05, pages 46 - 49 *
鞠照明;王玲芳;刘磊;: "互动电视边缘资源管理系统的设计与实现", 计算机工程, no. 17, pages 264 - 266 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111414259A (en) * 2020-02-10 2020-07-14 北京声智科技有限公司 Resource updating method, system, device, server and storage medium
CN111694857A (en) * 2020-06-12 2020-09-22 北京百度网讯科技有限公司 Method and device for storing resource data, electronic equipment and computer readable medium
CN111694857B (en) * 2020-06-12 2023-11-07 北京百度网讯科技有限公司 Method, device, electronic equipment and computer readable medium for storing resource data
CN113377371A (en) * 2021-06-02 2021-09-10 五八到家有限公司 Multi-scene configuration method, system, device and medium

Similar Documents

Publication Publication Date Title
CN109672741B (en) Micro-service monitoring method and device, computer equipment and storage medium
CN109885624B (en) Data processing method, data processing device, computer equipment and storage medium
CN110266752B (en) Block chain information pushing method and device, computer equipment and storage medium
CN109766534B (en) Report generation method and device, computer equipment and readable storage medium
CN110716916A (en) Resource online management method and device, computer equipment and storage medium
CN111310427A (en) Service data configuration processing method and device, computer equipment and storage medium
US9009850B2 (en) Database management by analyzing usage of database fields
CN109472577B (en) Account crediting method, account crediting device, computer equipment and storage medium
CN103533002A (en) Data processing method and system
CN112394908A (en) Method and device for automatically generating embedded point page, computer equipment and storage medium
WO2019153589A1 (en) Message data processing method and apparatus, and computer device and storage medium
CN110717647A (en) Decision flow construction method and device, computer equipment and storage medium
CN110825820A (en) Real-time data label obtaining method and device, computer equipment and storage medium
CN111209310A (en) Service data processing method and device based on stream computing and computer equipment
CN108809810B (en) Instant messaging-based message record checking method and system and computer equipment
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN113010542A (en) Service data processing method and device, computer equipment and storage medium
CN110321467A (en) Airport engineering project information methods of exhibiting, device, system, equipment and medium
CN111400126A (en) Network service abnormal data detection method, device, equipment and medium
US20180189329A1 (en) Rule based decisioning on metadata layers
CN110807050B (en) Performance analysis method, device, computer equipment and storage medium
CN115544007A (en) Label preprocessing method and device, computer equipment and storage medium
CN109697155B (en) IT system performance evaluation method, device, equipment and readable storage medium
CN113094248B (en) User behavior data analysis method and device, electronic equipment and medium
CN111046240A (en) Gateway flow statistical method, device, computer 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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200121

WD01 Invention patent application deemed withdrawn after publication