Object management method and device, computer equipment and storage medium

An object management and object technology, applied in the field of data processing, can solve the problem of long time consumption, achieve the effect of less memory consumption, less operation, and shorten the query time

Active Publication Date: 2020-01-17
BEIJING KUANGSHI TECH
10 Cites 1 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0005] Based on this, it is necessary to provide an object management method, device, computer equipment and storage med...
View more

Abstract

The invention relates to an object management method and a device, computer equipment and a storage medium. When the warehouse-out/warehouse-in/deletion number of the objects in the time period (t1, t2) needs to be inquired, the objects are deleted, only the cumulative change record corresponding to the sampling moment [t1] before t1 and closest to t1 and the cumulative change record correspondingto the sampling moment [t2] before t2 and closest to t2 need to be inquired in a second database; change records between the two cells (t1, [t1]) and (t2, [t2]) in a first database are queried; the number of objects to be queried can be obtained through a small amount of calculation; thus, no matter how large the change record is, the query result can be obtained only by performing two times of accurate query in the second database, two times of inter-cell query in the first database is performed and a small amount of operation is performed, all data do not need to be analyzed in the whole query process, the operation is less, the memory consumption is less, and the query time is greatly shortened.

Application Domain

Digital data information retrievalSpecial data processing applications

Technology Topic

Computer equipmentEngineering +6

Image

  • Object management method and device, computer equipment and storage medium
  • Object management method and device, computer equipment and storage medium
  • Object management method and device, computer equipment and storage medium

Examples

  • Experimental program(1)

Example Embodiment

[0041] In order to make the purpose, technical solutions, and advantages of this application clearer, the following further describes the application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
[0042] An object management method provided by this application can be applied to figure 1 In the application environment shown, the processor of the computer device is used to provide calculation and control capabilities in the application environment. The memory of the computer device includes a non-volatile 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 the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store the data of the object management method. The network interface of the computer device is used to communicate with other external devices through a network connection. The computer program is executed by the processor to realize an object management method.
[0043] In practical applications, counting objects in the time domain is a frequently faced problem. Generally, there are four types of addition, deletion, modification, and checking for object operations. When the object increases, the object statistical value increases, when the object is deleted, the object statistical value decreases, and when the object is modified, the object statistical value remains unchanged.
[0044] For example, the objects managed by the public security video image information library (referred to as the video library) include at least video fragment objects, image objects, file objects, personnel objects, face objects, motor vehicle objects, non-motor vehicle objects, object objects, scene objects, and videos. 11 categories such as case event objects and video image tag objects. Among them, these objects are uploaded by the collection equipment/collection platform (called warehousing) to the visual library. The log system records the uploaded category, warehousing mark, number, time stamp and other information; in addition, these objects can also be used by other System subscription, upload from the visual library to the external (called making library) system, then the log system will also record the category, entry and exit tags, number, timestamp and other information of the objects out of the library. Moreover, the stored object can also have a life cycle, that is, it will be deleted when it expires. Assuming that each collection device is calculated based on 5000 records stored in the warehouse every day, it can generate 150,000 inbound records in one month, and 1.8 million inbound records in a year. At this time, it may be easy to query the data within a few days. If you query the total amount of storage in the past year, directly accumulating these records is quite resource-consuming, and the time consumed is uncontrollable. Therefore, the embodiments of the present application provide an object management method, device, computer equipment, and storage medium, which are intended to solve the technical problem of long time-consuming when querying object statistical results from the view library.
[0045] Hereinafter, the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems will be described in detail through the embodiments and the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that an object management method provided by this application, Figure 2-Figure 4 The execution subject of is a computer device, where the execution subject may also be an object management device, where the device can be implemented as part or all of the computer device through software, hardware, or a combination of software and hardware.
[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, but not all the embodiments.
[0047] In one embodiment, figure 2 An object management method is provided. This embodiment relates to a specific process in which a computer device searches a database for at least one of the cumulative number of changes, the total number of changes, and the total number of objects in a database according to a query request. Such as figure 2 As shown, the method includes:
[0048] S101: Receive a query request of an object; the query request represents a request to query at least one of the cumulative change quantity, the total change quantity, and the total quantity of the object in a time period to be queried, and the time period to be queried includes a start time and an end time.
[0049] In this embodiment, the object represents any object that needs to be managed, and the object here may be an object to be queried, or an object to be updated. Among them, the query request means a request for querying the cumulative change quantity, total change quantity, or total quantity of an object. Optionally, the query request may include the change type, device ID and/or object category. The types of changes include outbound, inbound, or deleted. Correspondingly, the accumulated amount of changes includes accumulated inbound quantity, accumulated outbound quantity, or accumulated deleted quantity. The accumulated storage quantity represents the sum of the object storage quantity in a time period, the accumulated storage quantity represents the sum of the object storage quantity in a time period, and the cumulative deletion quantity represents the sum of the object deletion quantity in a time period. Optionally, the total number of changes represents the cumulative number of objects in the inventory during the time period to be queried minus the cumulative number of outgoing objects; when the object contains a life cycle, the expired objects will be deleted, and the total number of changes represents the time period to be queried The accumulated inbound quantity of the object minus the accumulated outbound quantity and the accumulated deleted quantity. Among them, the total number represents the total number at time T, that is, the number at the initial time of the system plus the total number of changes in the time period 0-T. It should be noted that when the query request is to query the total number of time periods to be queried, only the end time (time T) needs to be given, and the start time defaults to the system initial time.
[0050] Object categories include, but are not limited to, video clip objects, image objects, file objects, people objects, face objects, motor vehicle objects, non-motor vehicle objects, article objects, scene objects, video case event objects, video image tag objects, etc. A query request may be, for example, to query the number of face objects from the device with ID X1 between 14:00 on October 1st and 15:00 on October 2nd.
[0051] The way for the computer equipment to receive the query request can be to receive a request directly input by the user through the input device, or to receive a request sent by other devices, or to receive a voice request, etc. This embodiment does not limit the way of receiving the query request . It should be noted that the object management method provided in this application is a method used in an information database, for example, a public security video image information database, hereinafter referred to as a video library system.
[0052] S102. Acquire, in the first database, the first change quantity corresponding to the first change time between the first sampling time and the end time, and the second change corresponding to the second change time between the second sampling time and the start time Quantity, obtain the first cumulative change quantity between the first sampling time and the end time according to the first change quantity, and obtain the second cumulative change quantity between the second sampling time and the start time according to the second change quantity; in the first database Including the change record of the object, the change record of the object includes the change time when the number of objects changes and the corresponding change quantity; the first sampling time is the sampling time before the end time and the closest interval to the end time, and the second sampling time is at The sampling time before the start time and closest to the end time.
[0053] Among them, the sampling time represents the preset time for calculating the cumulative change quantity, for example, it can be 23:59:59 every day, that is, the cumulative change quantity of the object is recorded once every day at 23:59:59, for example, the first At 23:59:59 of the day, the cumulative number of changes in the object from the initial time of the system to the sampling time of the first day is recorded. At 23:59:59 of the second day, the number of changes from the initial time of the system to the sampling time of the next day is recorded. The accumulative number of changes of objects between the time and so on. At 23:59:59 on the nth day, the cumulative number of changes of the objects between the initial time of the system and the sampling time of the nth day is recorded.
[0054] The interval between the sampling moments can be fixed or non-fixed, which is not limited here. The sampling time at a fixed interval, such as 23:59:59 every day, is used as the sampling time, and the non-fixed sampling time, for example, when the change record reaches a certain number, the cumulative change amount is calculated, and the time when the cumulative change number is calculated is the sampling time.
[0055] Among them, the first database and the following second database in this step are two databases established in the search server in advance, where the search server refers to a full-text search engine, such as elasticSearch. This embodiment does not limit the type of search server. As long as it is an engine that can quickly store, search and analyze massive amounts of data. Taking the index in elasticSearch as an example, two indexes statics and days can be created in elasticSearc, corresponding to two databases, the first database is statics, and the second database is days.
[0056] The first database includes the change record of the object, and the change record of the object includes the change time when the number of the object changes and the corresponding change amount. In one example, the change records in the first database are shown in Table 1.
[0057] Table 1
[0058]
[0059] To continue the previous example, query the number of face objects from the device with ID X1 between 14:00 on October 1st and 15:00 on October 2nd, and the sampling time is 23:59 every day :59 o’clock, start time is 14:00 on October 1st, end time is 15:00 pm on October 2nd, first sampling time is 23:59:59 on October 1st, second sampling time It is 23:59:59 on September 30. There is no change record between the first sampling time and the end time, and the second change time is 3:00 on October 1st and 13:00 on October 1st. When the device ID is X1, the object category is face, and the change type is warehousing, the change records corresponding to the second change moment are the following two, and the number of changes corresponding to the second change moment is 5, 3, as shown in Table 2 below.
[0060] Table 2
[0061]
[0062] Correspondingly, the first cumulative change quantity is 0, and the second cumulative change quantity is 8.
[0063] S103: Acquire the third cumulative change quantity from the initial time of the system to the first sampling time and the fourth cumulative change quantity from the initial time of the system to the second sampling time in the second database; the second database includes the cumulative change records of the object, The cumulative change record includes the cumulative change number of the object from the initial time of the system to each sampling time.
[0064] In one example, the cumulative change records in the second database are shown in Table 3.
[0065] table 3
[0066]
[0067] To continue the previous example, when the query request is to query the number of face objects from the device with ID X1 between 14:00 on October 1st and 15:00 on October 2nd, the device ID Is X1, the object category is human face, the change type is storage, the third cumulative change quantity is 10, and the fourth cumulative change quantity is 2.
[0068] S104, according to the first cumulative change quantity, the second cumulative change quantity, the third cumulative change quantity, and the fourth cumulative change quantity, obtain at least one of the cumulative change quantity, the total change quantity, and the total quantity of the object in the time period to be queried .
[0069] To continue the previous example, when the query request is to query the number of face objects from the device with ID X1 between 14:00 on October 1st and 15:00 on October 2nd, the device ID Is X1, the object category is human face, and the change type is warehousing. You can get the third cumulative change + first cumulative change-fourth cumulative change-second cumulative change (10+0-2-8) The number of face objects from the device with ID X1 between 14:00 on October 1st and 15:00 on October 2nd is 0.
[0070] For example, taking the cumulative storage quantity that needs to be queried as an example, when the computer device queries the cumulative storage quantity of objects in the time period to be queried according to the query request, it can directly query the end time of the time period to be queried from the second database The accumulated storage quantity recorded at the previous sampling time and the accumulated storage quantity recorded at the sampling time before the start time. The accumulated storage quantity from the sampling time point before the end time to the end time, and the sampling time point before the start time to the start time can be based on The change records in the first database are analyzed and calculated in real time. The whole process is equivalent to dividing the query time period (t1, t2) with the sampling time as the node as (0, [t1]), ([t1], t1), ( 0,[t2]),([t2],t2) four time periods, for the time period (0,[t1]),(0,[t2]) where the cumulative change number has been recorded in the second database, from The cumulative change quantity is directly obtained in the second database. For the time period ([t1],t1),([t2],t2) that is not recorded in the second database, the cumulative change quantity is based on the objects stored in the first database Calculate the cumulative change amount in real-time for the change record, and finally calculate the total change. In this way, in the query process, the cumulative change amount for most of the time periods does not need to be calculated in real time, just search accurately from the second database, and a small amount of calculations are performed in real time in the first database for another small time period, which can realize fast calculation , Which makes the whole query process less memory consumption and shorter query time.
[0071] In the object management method provided in this embodiment, when it is necessary to query the number of outbound/inbound/deleted objects in the time period (t1, t2), since the change record of the object is stored in the first database, the change record of the object includes the object The number of changes at the time of change and the corresponding number of changes. The second database stores the cumulative change record of the object. The cumulative change record includes the cumulative change number of the object from the initial time of the system to each sampling time. Query the database for the cumulative change record corresponding to the sampling time [t1] before t1 and the closest to t1 and the cumulative change record corresponding to the sampling time [t2] before t2 and the closest to t2, query in the first database (t1,[t1 ]) and (t2,[t2]), the change records between the two cells, and then through a small amount of calculation, the number of objects to be queried can be obtained. In this way, no matter how large the change record is, it only needs to be performed twice in the second database Precise query, two inter-community queries in the first database, and then a few calculations to obtain the query results. The entire query process does not need to analyze all data, with less calculations and less memory consumption, which greatly shortens the query time.
[0072] In some scenarios, if the time period to be queried is short, there is no need to query in two databases, and the calculation can be performed directly in the first database. In one embodiment, if the time period to be queried is less than the first prediction If the duration threshold is set, the change quantity corresponding to the change time from the start time to the end time is obtained from the first database, and at least one of the cumulative change quantity, the total change quantity, and the total quantity is determined according to the change quantity.
[0073] Specifically, the computer device compares the duration of the time period to be queried with the first preset duration threshold, and if the duration of the time period to be queried is less than the first preset duration threshold, the computer device obtains from the first database from the start time to the end At least one of the cumulative change quantity, the total change quantity, and the total quantity is determined according to the change quantity corresponding to the change time between time. Wherein, the first preset duration threshold is a preset value, for example, it may be 24 hours, 48 ​​hours, etc., which is not limited in this embodiment. In this way, when the time period to be queried is short, real-time analysis and calculation directly through the first database will not consume too much computing resources, so there is no need to perform the step of obtaining data from the second database.
[0074] On the basis of the above embodiments, the embodiments of the present application also provide an object management method, which involves the specific process of updating the first database and the second database by a computer device, such as image 3 As shown, the method also includes:
[0075] S201: Obtain change information of the object; the change information includes at least one of warehouse-in information, warehouse-out information, and deletion information.
[0076] In this embodiment, the computer device obtains the change information of the object, where the change information includes at least one of warehouse-in information, warehouse-out information, and deletion information. The manner in which the computer device obtains the change information may be determined by receiving the input information of the external device, which is not limited in this embodiment.
[0077] S202: Update the first database and the second database according to the change information.
[0078] Based on the change information obtained in step S201 above, the computer device performs different updates according to the change information, for example, updates the inbound record of the object according to the inbound information, adds the outbound record to the object based on the outbound information, and updates according to the deletion. The information deletes and updates the object.
[0079] In the object management method provided in this embodiment, the computer device updates the data in the first database and the second database according to the change information of the object, which can ensure the validity, accuracy and timeliness of the data in the first database and the second database Further, the accuracy of the query results in the first database and the second database is ensured.
[0080] The following describes the update process corresponding to different change information, and provides a process for updating the first database. In one embodiment, when a preset condition is met, the change record corresponding to the change information is stored in the first database. Database; the preset condition includes the storage time since the last change record reaches the second preset duration threshold, or the preset condition includes the quantity of the first change information reaches the preset quantity threshold, where the first change information corresponds to the change The information change records the change information that is not stored in the first database.
[0081] Specifically, when the computer device updates the change record in the first database, it shall be subject to a preset condition, that is, if the storage time from the last change record at the current time reaches the second preset duration threshold, the computer device will update the current time Record all the change information between the time when the last change record was stored; or, if the quantity of the first change information reaches the preset number threshold, where the first change information is that the change record corresponding to the change information is not stored in the first The computer equipment stores the first change information in the first database. In this way, when the preset conditions are met, the immediacy of the data is guaranteed.
[0082] In another embodiment, such as Figure 4 As shown, a process for updating the second database is provided, and the process includes:
[0083] S301: Acquire a fifth cumulative change quantity at a third sampling time from the second database, where the third sampling time is a sampling time before the current sampling time.
[0084] The computer device obtains the last accumulated change amount stored in the second database, and the sampling time corresponding to the last accumulated change amount stored in the second database is the third sampling time, that is, the third sampling time is the previous sampling time of the current sampling time .
[0085] S302: Obtain a third change quantity corresponding to a third change time between the third sampling time and the current sampling time from the first database, and obtain a sixth cumulative change quantity according to the third change quantity.
[0086] The computer device obtains the amount of change between the third sampling moment and the current sampling moment from the first database, that is, the third amount of change, and the computer analyzes and calculates the sixth cumulative amount of change according to the third amount of change. It can be understood that the sixth cumulative change amount represents the change amount from the third sampling moment to the current sampling moment.
[0087] S303: According to the fifth cumulative change quantity and the sixth cumulative change quantity, obtain the cumulative change quantity at the current sampling time, and store the cumulative change record including the cumulative change quantity at the current sampling time in the second database.
[0088] In this step, the computer device determines the sum of the fifth cumulative change quantity and the sixth cumulative change quantity as the current cumulative change quantity, and stores the cumulative change record of the current sampling time cumulative change quantity in the second database.
[0089] To continue the previous example, the sampling time is 23:59:59 every day, and the current sampling time is 23:59:59 on October 2nd. When updating the second database, you need to get 23:59 on October 1st from the second database: The fifth cumulative change quantity of 59, and then obtain the change quantity from October 2 0:0:0 to October 2 23:59:59 from the first database, and obtain October 2 0 from the displayed change quantity: The sixth cumulative change quantity from 0:0 to October 2 at 23:59:59, and then the cumulative change quantity from the initial time of the system to the current sampling time is obtained from the fifth cumulative change quantity and the sixth cumulative change quantity.
[0090] It should be noted that when the computer device updates the first database and the second database, the cumulative change quantity corresponding to each type is updated according to different change types. In this embodiment, by updating the data in the first database and the second database, the accuracy and timeliness of the data in the first database and the second data are guaranteed.
[0091] In one embodiment, the change record and the cumulative change record also include the object’s generating device ID and the object category; optionally, the cumulative change quantity, total change quantity, and total quantity include the cumulative change of the object in the specific ID generating device Quantity, total change quantity, total quantity; and/or, cumulative change quantity, total change quantity, and total quantity include the cumulative change quantity, total change quantity, and total quantity of a specific type of object.
[0092] Wherein, the object's generating device ID represents the ID of the device that generated the object. For example, if it is a face object, the device that generated the image is the ID of the collection device that captured the image. In this way, the change record and the cumulative change record also include the object's generating device ID to facilitate the identification of the source of the object. The types of objects include human faces, people, etc. Correspondingly, when querying the number of objects, you can query the cumulative number of changes, the total number of changes, and the total number of objects in the device that generates a specific ID. You can also query the cumulative number of changes, the total number of changes, and the total number of changes for a specific type of object. The total quantity can also be queried for the specific ID generating device, the cumulative change quantity, the total change quantity, and the total quantity of a specific type of object, which is not limited in this embodiment. Dividing objects according to specific IDs and specific types can adapt to different query needs of users.
[0093] In some scenarios, during the process of updating the data in the first database and the second database, if there are no operations such as leaving, storing, or deleting information in the visual library system on a certain day, then the sampling time of the day (for example, 23:59: 59) The cumulative change quantity is the same as the cumulative change quantity at the sampling time of the previous day. In this case, the cumulative change quantity in the second database may not be recorded, or the cumulative change quantity of the previous day can be directly used as the record. The embodiment does not limit this.
[0094] Based on all the above embodiments, this application provides a complete embodiment of the process of data storage, update to query:
[0095] For the visual library system, assuming that there are 11 types of objects managed by it, the number statistics for the 11 types of objects can be regarded as an R with 11 statistical dimensions. 11 In the operation of vectors in space, in actual applications, these objects always come from a uniquely identified collection device/collection platform/external system (referred to as X below), so the device ID is used to identify the vector. Write it down when writing the log, indicating that the record belongs to device X. Set the search server as elasticSearch, the first database (hereinafter referred to as the first index in this embodiment) is statics, and the second database (hereinafter referred to as the second index in this embodiment) is days;
[0096] Take warehousing as an example, f(t) represents the warehousing number of equipment X at time t, the warehousing information of the equipment X at time t is stored in the first index statics, and the function f(t) is used to represent the number of warehousing , Then the function f(t) is a vector with multiple dimensions f(t)=[f 1 (t),f 2 (t),...,f n (t)], such as the first dimension f 1 (t) represents the number of faces, the second dimension f 2 (t) represents the number of motor vehicles, etc. S(t) is used to represent the total amount of storage of equipment X from the initial state of the original image system (time 0) to time t, where time 0 is the moment when the view library is deployed and just started, which can be UTC (Uniform Universal Time) The start time (1970-1-100:00:00) of the time can also be the actual project deployment completion time, which is not limited in this embodiment. among them
[0097] Specifically, if the module that executes this method is set as the log module, the process of periodically generating original warehouse records and storing them in statics includes: whenever the device/platform uploads the above 11 types of objects to the visual library system, the log module is called to log It is recorded in the memory of the module, and the log module records the instantaneous quantity f(t): collect instantaneous inbound, outbound, and delete information, and write records to statics. Here "instantaneous" refers to a short period of time, such as 5s, 10s, 15s, etc., the log module will periodically (for example, 10 seconds or the number of records in the log memory reaches a certain threshold), and this instantaneous storage Information summary writes records to statics. If there are other objects, they also need to be written.
[0098] On the other hand, when an object is out of the library every day, or the object is deleted when it expires, the log module will also periodically write records to statics. The following table 4 shows the change records in the first database, which means that within 10s of 1561368429-1561368439, there are 5 faces of device X1 stored in the database (here, the change time in a change record is recorded as the time in a short period of time. At the last point in time), there are 3 people leaving the library; within 10s of 1561368439-1561368449, device X1 deletes 1 face and X2 deletes 1 scene.
[0099] Table 4
[0100] Serial number Device ID Object type Variation type Moment of change Number of changes 1 X1 human face "Warehousing" 1561368439 5 2 X1 personnel "Out of the library" 1561368439 3 3 X1 human face "delete" 1561368449 1 4 X2 Scenes "delete" 1561368449 1
[0101] Among them, the process of periodically analyzing the original entry and exit records to obtain the cumulative change record in the second database includes: the statistics module is responsible for recording the cumulative change number s(t): calculating two sampling points t i , T i+1 , The cumulative inbound quantity, cumulative outbound quantity, or cumulative deleted quantity generated between, take the cumulative inbound quantity as an example, the increment Where t i And t i+1 The interval between, can be every fixed time, such as 23:59:59 every day, or it can be a non-fixed time.
[0102] For example, every day at 23:59:59, group all the original inbound and outbound records from 00:00:00 to 23:59:59 that day by device ID, and then perform statistics on the 11 types of objects in each group, and get each change according to the type of change The cumulative change amount of the type. For the data in Table 4 above, the processing results: X1 storage = [0,0,0,0,5,0,0,0,0,0,0], the fifth dimension represents the number of faces, X1 is out Library=[0,0,0,3,0,0,0,0,0,0,0], the fourth dimension represents the number of personnel, X1 delete=[0,0,0,0,1,0 ,0,0,0,0,0], the fifth dimension represents the number of faces. X2 delete=[0,0,0,0,0,0,0,0,1,0,0], the 9th dimension represents the number of scenes. Each dimension of the vector represents the statistical value of the number of objects in a category.
[0103] Among them, the process of updating the accumulated value table days includes:
[0104] The statistics module is also responsible for closing t i The cumulative change amount S(t i ) Plus increment S inc Write days, that is, put The result of is written into days, and for each device X, a cumulative change quantity of inbound, outbound, and deleted is written separately. Take warehousing as an example, the writing method is: query the cumulative warehousing quantity written last time by X (match the device ID and change type, take the record with the longest time), record it as S old =S(t i ), this record and the previously calculated cumulative storage quantity S of X inc Add: S new =S(t i+1 )=S old +S inc , Add the result S new The cumulative change record written to the second database, where S new The corresponding sampling time is 23:59:59 of the current day. Of course, if the device X does not have a record of inbound/outbound/deleted on that day, the cumulative change quantity of the previous day can be used as the cumulative change quantity of the day, or it is not on the first day. 2. The accumulated change records of the day are stored in the database.
[0105] Among them, the process of the quick query method includes: taking the cumulative storage quantity generated by the query device X in the time period [a, b] as an example. Cumulative storage quantity
[0106] (i) From the second database days, respectively query the cumulative storage quantity S at time [a], [b] [a] And S [b]. For obtaining the cumulative storage quantity S at the time [a] [a] , The query condition is that the matching device ID and the change type are "stock-in", and the cumulative change quantity corresponding to the closest cumulative change record with the sampling time less than or equal to a is taken; the same is true for obtaining the cumulative change quantity at time [b]. If there is no result, it means that there has been no warehousing record since the initial time of the system.
[0107] (ii) From the first database, query the number of warehouse receipts generated by the time period [[a],a] and [[b],b] of the device X in the cell, that is, match the device ID from statics and change the type to "inbound Query database" and time zone, summarize the query results, and get the cumulative change of the two time intervals [[a],a] and [[b],b] with
[0108] Combining the above two parts (i) (ii) results according to the formula The operation can get the final result. It can be understood that step (ii) can be performed before step (i), and the order of steps (i) and (ii) is not limited.
[0109] Generally, when the span of [a,b] is more than 3 days, the above query method is used. Otherwise, if the time period of [a,b] is very short, then query statics directly and accumulate the results. The same is true for the query of outbound and deleted information, so I won’t repeat it here.
[0110] According to the completion management process provided by this embodiment, it can be seen that for querying the total amount of outbound/inbound/deleted generated by the specified device X in any time interval [a,b], no matter how large the number of records is, it only needs to start from day s Perform accurate query of the historical cumulative change quantity, query the change quantity in a small time interval (within one day) from statics, and finally complete the accumulation, which greatly improves the query efficiency.
[0111] It should be understood that although Figure 2-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly restricted in order, and these steps can be executed in other orders. and, Figure 2-4 At least part of the steps in may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the order of execution of these sub-steps or stages is not necessarily It is performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0112] In one embodiment, such as Figure 5 As shown, an object management device is provided, which includes: a receiving module 10, a first acquiring module 11, a second acquiring module 12, and a determining module 13, wherein,
[0113] The receiving module 10 is used to receive a query request for an object; the query request indicates a request to query at least one of the cumulative number of changes, the total number of changes, and the total number of the object in the time period to be queried. The time period to be queried includes the start time and the end time ;
[0114] The first acquiring module 11 is configured to acquire, in the first database, the first change quantity corresponding to the first change time between the first sampling time and the end time, and the second change between the second sampling time and the start time The second change quantity corresponding to the time, the first cumulative change quantity between the first sampling time and the end time is obtained according to the first change quantity, and the second cumulative change between the second sampling time and the start time is obtained according to the second change quantity Quantity; the first database includes the change record of the object, the change record of the object includes the change time when the number of the object changes and the corresponding change quantity; the first sampling time is the sampling time before the end time and the closest interval to the end time, The second sampling time is the sampling time before the start time and closest to the end time;
[0115] The second acquiring module 12 is configured to acquire the third cumulative change quantity from the initial time of the system to the first sampling time and the fourth cumulative change quantity from the initial time of the system to the second sampling time in the second database; the second database includes The cumulative change record of the object, which includes the cumulative change amount of the object from the initial time of the system to each sampling time;
[0116] The determination module 13 is used to obtain the cumulative change number, total change number, and total number of objects in the time period to be queried according to the first cumulative change quantity, the second cumulative change quantity, the third cumulative change quantity, and the fourth cumulative change quantity. At least one of.
[0117] The object management device provided in the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0118] In one embodiment, if the duration of the time period to be queried is less than the first preset duration threshold, the change quantity corresponding to the change time from the start time to the end time is obtained from the first database, and the cumulative change quantity is determined according to the change quantity , At least one of the total number of changes and the total number.
[0119] The object management device provided in the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0120] In one embodiment, the cumulative change quantity includes one of the cumulative warehousing quantity, the cumulative exit quantity, and the cumulative deletion quantity; the change record and the cumulative change record include a change type, and the change type includes at least one of warehousing, delivery, and deletion. Kind.
[0121] The object management device provided in the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0122] In one embodiment, the total number of changes of objects in the time period to be queried represents the cumulative number of objects in the inventory during the time period to be queried minus the cumulative number of outgoing objects; or, the total number of changes in the objects during the time period to be queried represents the number of objects to be queried The accumulated inbound quantity of objects within the time period minus the accumulated outbound quantity and the accumulated deleted quantity;
[0123] The total number of objects in the time period to be queried represents the number of objects at the initial time of the system plus the total number of changes in the objects in the time period to be queried.
[0124] The object management device provided in the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0125] In one embodiment, such as Image 6 As shown, an object management device is provided, and the device further includes: an acquisition module 14 and an update module 15, wherein,
[0126] The obtaining module 14 is used to obtain change information of the object; the change information includes at least one of inbound information, outbound information, and deletion information;
[0127] The update module 15 is used to update the first database and the second database according to the change information.
[0128] The object management device provided by the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0129] In one embodiment, the above-mentioned update module 15 is used to store the change record corresponding to the change information in the first database when the preset condition is met; the preset condition includes the storage time since the last change record reaches the second preset duration The threshold value, or the preset condition includes that the quantity of the first change information reaches the preset quantity threshold value, and the first change information is change information corresponding to the change information that is not stored in the first database.
[0130] The object management device provided by the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0131] In one embodiment, such as Figure 7 As shown, an object management apparatus is provided, and the above-mentioned update module 15 includes: a first obtaining unit 151, a second obtaining unit 152, and a storage unit 153, wherein:
[0132] The first acquiring unit 151 is configured to acquire the fifth cumulative change quantity from the initial time of the system to the third sampling time from the second database, and the third sampling time is the previous sampling time of the current sampling time;
[0133] The second acquiring unit 152 is configured to acquire the third change quantity corresponding to the third change time between the third sampling time and the current sampling time from the first database, and obtain the sixth cumulative change quantity according to the third change quantity;
[0134] The storage unit 153 is configured to obtain the cumulative change quantity from the initial time of the system to the current sampling time according to the fifth cumulative change quantity and the sixth cumulative change quantity, and store the cumulative change record containing the cumulative change quantity from the system initial time to the current sampling time To the second database.
[0135] The object management device provided in the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0136] In an embodiment, the above-mentioned change record and cumulative change record also include the object generating device ID and the object category.
[0137] The object management device provided in the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0138] In one embodiment, the above-mentioned cumulative change number, total change number, and total number include the cumulative change number, total change number, and total number of objects in the specific ID generating device; and/or, the cumulative change number, total change number, and total The quantity includes the cumulative change quantity, total change quantity, and total quantity of objects of a specific category.
[0139] The object management device provided in the foregoing embodiment has an implementation principle and technical effect similar to the foregoing method embodiment, and will not be repeated here.
[0140] For the specific limitation of the object management device, please refer to the above limitation of the object management method, which will not be repeated here. Each module in the above-mentioned object management device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
[0141] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as figure 1 Shown. The computer equipment includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize an object management method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, or it can be a button, a trackball or a touchpad set on the housing of the computer equipment , It can also be an external keyboard, touchpad, or mouse.
[0142] Those skilled in the art can understand that the above figure 1 The structure shown in is only a block diagram of part of the structure related to the solution of the application, and does not constitute a limitation on the computer equipment to which the solution of the application is applied. The specific computer equipment may include more or Fewer parts, or combine some parts, or have a different arrangement of parts.
[0143] In one embodiment, a computer device is provided, including a memory and a processor, and a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:
[0144] Receive a query request of an object; the query request means a request to query at least one of the cumulative change quantity, total change quantity, and total quantity of the object in the time period to be queried, and the time period to be queried includes a start time and an end time;
[0145] Acquire in the first database the first change quantity corresponding to the first change time between the first sampling time and the end time, and the second change quantity corresponding to the second change time between the second sampling time and the start time, Obtain the first cumulative change quantity between the first sampling time and the end time according to the first change quantity, and obtain the second cumulative change quantity between the second sampling time and the start time according to the second change quantity; the first database includes objects The change record of the object, the change record of the object includes the change time when the number of objects changes and the corresponding change amount; the first sampling time is the sampling time before the end time and the closest interval to the end time, and the second sampling time is at the start time The sampling time before and closest to the end time;
[0146] Acquire the third cumulative change quantity from the initial time of the system to the first sampling time in the second database, and obtain the fourth cumulative change quantity from the initial time of the system to the second sampling time; the second database includes the cumulative change record of the object, and the cumulative change The record includes the cumulative change amount of the object from the initial time of the system to each sampling time;
[0147] According to the first cumulative change quantity, the second cumulative change quantity, the third cumulative change quantity, and the fourth cumulative change quantity, at least one of the cumulative change quantity, the total change quantity, and the total quantity of the object in the time period to be queried is obtained.
[0148] The implementation principle and technical effect of a computer device provided by the foregoing embodiment are similar to those of the foregoing method embodiment, and will not be repeated here.
[0149] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0150] Receive a query request of an object; the query request means a request to query at least one of the cumulative change quantity, total change quantity, and total quantity of the object in the time period to be queried, and the time period to be queried includes a start time and an end time;
[0151] Acquire in the first database the first change quantity corresponding to the first change time between the first sampling time and the end time, and the second change quantity corresponding to the second change time between the second sampling time and the start time, Obtain the first cumulative change quantity between the first sampling time and the end time according to the first change quantity, and obtain the second cumulative change quantity between the second sampling time and the start time according to the second change quantity; the first database includes objects The change record of the object, the change record of the object includes the change time when the number of objects changes and the corresponding change amount; the first sampling time is the sampling time before the end time and the closest interval to the end time, and the second sampling time is at the start time The sampling time before and closest to the end time;
[0152] Acquire the third cumulative change quantity from the initial time of the system to the first sampling time in the second database, and obtain the fourth cumulative change quantity from the initial time of the system to the second sampling time; the second database includes the cumulative change record of the object, and the cumulative change The record includes the cumulative change amount of the object from the initial time of the system to each sampling time;
[0153] According to the first cumulative change quantity, the second cumulative change quantity, the third cumulative change quantity, and the fourth cumulative change quantity, at least one of the cumulative change quantity, the total change quantity, and the total quantity of the object in the time period to be queried is obtained.
[0154] The foregoing embodiment provides a computer-readable storage medium, and its implementation principle and technical effect are similar to those of the foregoing method embodiment, and will not be repeated here.
[0155] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the procedures of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0156] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, they should It is considered as the range described in this specification.
[0157] The above-mentioned embodiments only express several implementation manners of the present application, and their description is relatively specific and detailed, but they should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Voice processing device, voice processing method, and program

ActiveUS20180286411A1accurately identifyreduce operation
Owner:HONDA MOTOR CO LTD

Control method of intelligent water heater and intelligent water heater

ActiveCN108870753Areduce operationeasy to use
Owner:深圳市TCL高新技术开发有限公司

Heart valve prosthesis

InactiveUS20160000559A1improve accuracyreduce operation
Owner:SHANGHAI MICROPORT CARDIOFLOW MEDTECH CO LTD

Wordline pulse duration adaptation in a data storage apparatus

ActiveUS20150269982A1reduce capacitive loadingreduce operation
Owner:ARM LTD

Classification and recommendation of technical efficacy words

  • reduce operation
  • Reduce memory consumption

Device for fixing a module to the surface of a tire

ActiveUS20060201241A1reduce operation
Owner:MICHELIN & CO CIE GEN DES ESTAB MICHELIN

Convertible roof bow control mechanism

InactiveUS20060152033A1reduces activation forcereduce operation
Owner:SPECIALTY VEHICLE ACQUISITION

Method and device for monitoring network data flow

InactiveCN101626323ASimplify workloadReduce memory consumption
Owner:ZTE CORP

A storage resource management method based on storage medium types and weighting quotas

InactiveCN106990915AGuaranteed scalability and fault toleranceReduce memory consumption
Owner:BEIHANG UNIV

Design method of medical image cloud storage platform

ActiveCN108806773AReduce memory consumptionImprove reading speed
Owner:上海熙业信息科技有限公司

Modularized network intrusion detection system

InactiveCN101699788AFlexible configurationReduce memory consumption
Owner:TSINGHUA UNIV

Rotational symmetric body electromagnetic scattering property simulation method based on matrix nest compression

ActiveCN103279589AComputation time and computation speed improvementsReduce memory consumption
Owner:NANJING UNIV OF SCI & TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products