WO2022088466A1 - 一种备件消耗数据查询方法、系统和存储介质 - Google Patents

一种备件消耗数据查询方法、系统和存储介质 Download PDF

Info

Publication number
WO2022088466A1
WO2022088466A1 PCT/CN2020/140082 CN2020140082W WO2022088466A1 WO 2022088466 A1 WO2022088466 A1 WO 2022088466A1 CN 2020140082 W CN2020140082 W CN 2020140082W WO 2022088466 A1 WO2022088466 A1 WO 2022088466A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
consumption data
spare parts
time
spare
Prior art date
Application number
PCT/CN2020/140082
Other languages
English (en)
French (fr)
Inventor
韩勤
何嘉豪
卢晓芳
陈旻琪
贺毅
左志军
Original Assignee
广州明珞装备股份有限公司
明珞汽车装备(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州明珞装备股份有限公司, 明珞汽车装备(上海)有限公司 filed Critical 广州明珞装备股份有限公司
Publication of WO2022088466A1 publication Critical patent/WO2022088466A1/zh

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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24561Intermediate data storage techniques for performance improvement
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the invention relates to the technical field of data query and storage, in particular to a method, system and storage medium for querying spare parts consumption data.
  • the purpose of the present invention is to provide a method, system and storage medium for querying spare parts consumption data, so as to improve the query performance of querying spare parts consumption data.
  • the first technical scheme adopted in the present invention is:
  • a method for querying spare parts consumption data comprising:
  • the storing the spare parts consumption data in the first database, the second database and the third database specifically includes:
  • the first database, the second database and the third database are backups of each other.
  • User login verification is performed according to the login information and the user information.
  • the user interface is initialized according to the user information, where the user information includes historical query information and station management information.
  • the workstation is obtained by at least one of the following steps:
  • the second technical scheme adopted by the present invention is:
  • a spare parts consumption data query system comprising:
  • the input module is used to obtain the time range, spare part type and station of spare parts consumption data query according to the input;
  • a time-sharing module configured to divide the time range into several time intervals according to the first time threshold and the second time threshold
  • an extraction module configured to determine that there is a first time interval that is less than or equal to a first time threshold in the time range, and obtain the consumption data of the spare parts of the spare part type of the work station in the first time interval from the first database; determine There is a second time interval greater than the first time threshold and less than or equal to the second time threshold in the time range, and the consumption data of the spare parts of the spare part type of the work station in the second time interval is obtained from the second database; determine There is a third time interval greater than the second time threshold in the time range, and the consumption data of the spare parts of the spare part type of the work station in the third time interval is obtained from the third database.
  • the third technical scheme adopted by the present invention is:
  • a spare parts consumption data query system comprising:
  • the processor is configured to load the program to execute the method for querying spare parts consumption data.
  • the fourth technical scheme adopted by the present invention is:
  • the present invention stores the spare parts consumption data in the first database, the second database and the third database respectively according to the real-time requirement, and according to the time range of the query, the data is stored in the first database, the second database and the third database respectively.
  • the traditional database storage and query it has higher query performance and satisfies the real-time nature of spare parts consumption data query.
  • FIG. 1 is a first flowchart of a method for querying spare parts consumption data according to an embodiment of the present invention
  • FIG. 2 is a second flowchart of a method for querying spare parts consumption data according to an embodiment of the present invention
  • FIG. 3 is a GUI diagram of a method for querying spare parts consumption data according to an embodiment of the present invention.
  • FIG. 4 is a first structural diagram of a spare parts consumption data query system according to an embodiment of the present invention.
  • FIG. 5 is a second structural diagram of a system for querying spare parts consumption data according to an embodiment of the present invention.
  • An embodiment of the present invention provides a method for querying spare parts consumption data. Referring to FIG. 2 , the method includes:
  • S50 Determine that there is a third time interval in the time range that is greater than the second time threshold, and acquire, from the third database, the consumption data of the spare parts of the spare part type of the work station in the third time interval.
  • the spare parts consumption data are stored in the first database, the second database and the third database, and the spare parts consumption data are collected and extracted from different databases through a limited query time range.
  • the system greatly improves the query performance of spare parts consumption data.
  • spare parts reserved for maintenance are called spare parts, and the spare parts consumption data is used to record the consumption of spare parts.
  • the time range is used to limit the query time range of the spare parts consumption data. Users can select the time range to query the spare parts consumption within the specified time range; the spare part type is used to limit the types of spare parts to be queried.
  • the workstation is the most basic production unit in the production process. Personnel, equipment, raw materials and tools are arranged on the workstation for production and assembly. Spare parts consumption statistics by station can be refined to the station for spare parts consumption analysis, and the utilization rate of spare parts can be improved based on the station.
  • the first time threshold and the second time threshold divide the specified query time range into a first time interval, a second time interval, and a third time interval; the time range less than or equal to the first time threshold is the first time interval, and less than or equal to the first time interval.
  • a time range with two time thresholds and greater than the first time threshold is a second time interval; a time range greater than the second time threshold is a third time interval.
  • the first database stores the data of the first time range, the second database stores the data of the first time range and the second time range, and the third database stores the data of the first time range, the second time range and the third time range .
  • the response speed of the first database is the fastest, the response speed of the second database is second, and the response speed of the third database is the slowest.
  • the spare parts consumption data of the first time interval is obtained from the first database
  • the spare parts consumption data of the second time interval is obtained from the second database
  • the spare parts consumption data of the third time interval is obtained from the third database.
  • the first database can be a cache database, and the data of the cache database is not stored in the database, but is cached in the memory, so the response speed of the cache database is very fast, but it also takes up a lot of memory resources.
  • a database stores data with high real-time requirements, generally the data collected within 30s.
  • the second database may be a time series database, and the time series database is called a time series database in full.
  • the time series database is mainly used to refer to the processing of time-labeled data, which is also called time-series data.
  • relational databases are often used for processing.
  • the time series big data solution uses a special storage method to enable time series big data to efficiently store and quickly process massive time series big data, which is an important technology to solve massive data processing.
  • the second database stores data with a relatively high frequency of use, generally data collected within 30 days.
  • the third database can be a relational database.
  • a relational database is a database based on the relational database model.
  • the data in the database is processed by means of concepts and methods such as set algebra.
  • the essence of this form of table function is to hold a special collection of data items, the data in these tables can be accessed or reassembled in many different ways without the need to reorganize the database table.
  • all the spare parts consumption data are stored in the third database. Since the spare parts consumption data will always be superimposed, the query efficiency of the third database will gradually decrease.
  • consumption data including the following steps:
  • the spare parts consumption data is obtained from the first database in real time, and the spare parts consumption chart is dynamically drawn according to the obtained spare parts consumption data.
  • the spare parts consumption chart is dynamically drawn according to the obtained spare parts consumption data.
  • the first database and the second database have relatively high requirements on the response speed of the databases, it is necessary to limit the data capacity stored in the first database and the second database.
  • the data volume of the first database and the second database is reduced, and the retrieval efficiency of the database is improved, thereby The query response efficiency of the database is improved.
  • the storing the spare parts consumption data in the first database, the second database and the third database specifically includes:
  • the first database, the second database and the third database are backups of each other.
  • message middleware utilizes an efficient and reliable message delivery mechanism for platform-independent data exchange, and integrates distributed systems based on data communication. It scales interprocess communication in a distributed environment by providing a message passing and message queuing model. Through the message middleware, the spare parts consumption data can be stored in three different databases in a distributed manner to improve the efficiency of data storage.
  • the second database and the third database as backups for each other, in the case of data errors in a certain database, data can be obtained by querying other databases, which improves the robustness of database storage.
  • User login verification is performed according to the login information and the user information.
  • user authentication is performed through login information, so as to prevent unknown users from intrusive access to the spare parts consumption data, thereby improving the security of the spare parts consumption data.
  • the user interface is initialized according to the user information, where the user information includes historical query information and station management information.
  • the user information includes the user's login account, password, historical query information and workstation management information.
  • Historical query information the user's query records will be recorded, if the user is set to initialize based on historical query information. Each time you log in again, the query will be performed according to the last query command, that is, the time range, spare parts and workstations of the last query. By reusing historical query information, the convenience of users is improved.
  • each user will correspond to a managed station. If the user is set to be initialized according to the station management information, each re-login will display the spare parts consumption data according to the station corresponding to the user's management.
  • the workstation is obtained by at least one of the following steps:
  • the GUI is divided into four areas, namely a process tree 301 , a drawing area 302 , a list of reports 305 and other filters 304 .
  • the craft tree 301 is used to select the station, and the craft tree 301 provides two ways to select the station, namely, the quick search 3011 and the node selection 3012.
  • the quick search 3011 is used to directly input keywords to search, and the GUI will Display the corresponding keyword search results for the user to select the workstation;
  • node selection 3012 is used to place the workstation under different location nodes according to the location of the workstation. By selecting different location nodes, the next level node under the location node can be viewed , Classify the workstations by location by means of nodes, which is convenient for users to quickly locate the workstations.
  • the drawing area 302 is used for drawing charts.
  • the drawing style of the chart can be selected, for example, a line graph, a pie graph or a tree graph can be selected as the display style.
  • Display selection 303 is used to control the display or hide of objects in the drawing area 302. Since multiple stations can be selected under the process tree 301 or multiple spare parts types can be selected under other filters 304, the drawing area can display multiple curves. The user can click to select the curve that needs to be hidden in the display selection 303, so as to analyze the different spare parts consumption data.
  • Other filters 304 include Time Range and Spare Part Type for selecting the time range and spare part type for the spare part consumption data.
  • the present invention also provides a spare parts consumption data query system, referring to FIG. 4 , including:
  • the input module 401 is used to obtain the time range, spare part type and work position of the spare parts consumption data query according to the input;
  • a time-sharing module 402 configured to divide the time range into several time intervals according to the first time threshold and the second time threshold;
  • An extraction module 403, configured to determine that there is a first time interval that is less than or equal to a first time threshold in the time range, and obtain from the first database the consumption data of the spare parts of the spare part type of the workstation in the first time interval; Determine that there is a second time interval in the time range that is greater than the first time threshold and less than or equal to the second time threshold, and obtain the consumption data of the spare parts of the spare part type of the work station in the second time interval from the second database; It is determined that a third time interval greater than the second time threshold exists in the time range, and the consumption data of the spare parts of the spare part type of the work station in the third time interval is acquired from the third database.
  • the contents in the above method embodiments are all applicable to the present system embodiments, the specific functions implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved by the above method embodiments are the same as those achieved by the above method embodiments. Also the same.
  • the layers, modules, units, and/or platforms, etc. included in the systems of embodiments of the present invention may be implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in non-transitory computer-readable memory to realize or implement.
  • the methods can be implemented in a computer program using standard programming techniques - including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the specific Methods and figures described in the Examples.
  • Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. Furthermore, the program can be run on a programmed application specific integrated circuit for this purpose.
  • the data processing flow corresponding to the layers, modules, units and/or platforms included in the system of the embodiments of the present invention may be executed in any suitable order, unless otherwise indicated herein or otherwise clearly inconsistent with the context contradiction.
  • the data processing flow corresponding to the layers, modules, units and/or platforms included in the system of the embodiments of the present invention may be executed under the control of one or more computer systems configured with executable instructions, and may be executed as a common Code (eg, executable instructions, one or more computer programs, or one or more applications) executing on one or more processors, implemented by hardware, or a combination thereof.
  • the computer program includes a plurality of instructions executable by one or more processors.
  • the embodiment of the present invention also provides a spare parts consumption data query system, referring to FIG. 5 , including:
  • the processor 502 is configured to load the program to execute the method for querying spare parts consumption data.
  • the contents in the above method embodiments are all applicable to the present system embodiments, the specific functions implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved by the above method embodiments are the same as those achieved by the above method embodiments. Also the same.
  • the system may be implemented in any type of computing platform operably linked to a suitable computer, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, separate or integrated computer platforms, Or communicate with charged particle tools or other imaging devices, etc.
  • the data processing flow corresponding to the layers, modules, units and/or platforms included in the system of the present invention can be implemented by machine-readable codes stored on a non-transitory storage medium or device, whether it is removable or integrated to a computing platform, such as a hard disk, an optically readable and/or writeable storage medium, RAM, ROM, etc., such that it can be read by a programmable computer, and when the storage medium or device is read by the computer, can be used to configure and operate the computer to perform process described here.
  • a computing platform such as a hard disk, an optically readable and/or writeable storage medium, RAM, ROM, etc.
  • the machine-readable code, or portions thereof may be transmitted over wired or wireless networks.
  • the invention described herein includes these and other various types of non-transitory computer-readable storage media when such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor.
  • the invention also includes the computer itself when programmed according to the methods and techniques described herein.
  • Embodiments of the present invention further provide a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method for querying spare parts consumption data is implemented.
  • the storage medium stores processor-executable instructions, and when executed by the processor, the processor-executable instructions are used to execute a kind of interaction information described in any one of the technical solutions in the foregoing method embodiments. Processing method steps.
  • the storage medium may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. It can be seen that the contents in the above method embodiments are all applicable to this storage medium embodiment, the specific functions implemented by this storage medium embodiment are the same as the above method embodiments, and the beneficial effects achieved are the same as those achieved by the above method embodiments. The effect is also the same.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种备件消耗数据查询方法,包括:根据输入获取备件消耗数据查询的时间范围、备件类型和工位(S10);将所述时间范围按照第一时间阈值和第二时间阈值分为若干时间区间(S20);根据所述时间区间分别从第一数据库、第二数据库和第三数据库中提取备件的消耗数据。将备件消耗数据按照实时性要求分别存储到第一数据库、第二数据库和第三数据库,按照查询的时间范围分别从第一数据库、第二数据库和第三数据库中提取备件消耗数据,相比于传统的数据库存储和查询具有更高的查询性能,满足了备件消耗数据查询的实时性。可广泛应用于数据查询及存储领域中。

Description

一种备件消耗数据查询方法、系统和存储介质 技术领域
本发明涉及数据查询及存储技术领域,尤其涉及一种备件消耗数据查询方法、系统和存储介质。
背景技术
由于现实环境中机械设备在临近极限姿态工作时,设备本身的损耗较为严重,导致时常需要更换备件。对于备件消耗的统计不明晰,会导致备件库存有不足或者积压的情况,备件不足可能导致意外停产,意外停产将伴随着巨大的损失;备件积压则伴随着高昂的运维成本。同时,目前生产线的优化主要依靠经验丰富的工程师进行评估,评估过程中需要基于实际数据作为评估依据,所以工程项目中一般要求在生产阶段中,及时采集设备消耗数据,为生产设备状态提供评估依据。
传统的出入库统计基于备件出入库的时间进行备件消耗的统计,其一般基于传统的数据库进行数据存储,但传统的数据库统计无法支撑并发访问需求,容易单点故障,威胁系统稳定性,无法保障备件消耗数据的查询性能。
发明内容
有鉴于此,本发明的目的是提供一种备件消耗数据查询方法、系统和存储介质,以提高备件消耗数据查询的查询性能。
本发明所采用的第一技术方案是:
一种备件消耗数据查询方法,包括:
根据输入获取备件消耗数据查询的时间范围、备件类型和工位;
将所述时间范围按照第一时间阈值和第二时间阈值分为若干时间区间;
确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据;
确定所述时间范围存在大于第一时间阈值且小于等于第二时间阈值的第二时间区间,从第二数据库中获取所述工位在第二时间区间内所述备件类型的备件的消耗数据;
确定所述时间范围存在大于第二时间阈值第三时间区间,从第三数据库中获取所述工位在第三时间区间内所述备件类型的备件的消耗数据。
进一步,所述确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数 据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据,包括以下步骤:
确定所述时间范围存在小于等于第一时间阈值的第一时间区间,实时从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据。
进一步,还包括以下步骤:
采集备件消耗数据,将备件消耗数据存储至第一数据库、第二数据库和第三数据库;
确定所述备件消耗数据的存放时间超过第一时间阈值,在第一数据库中删除所述备件消耗数据;
确定所述备件消耗数据的存放时间超过第二时间阈值,在第二数据库中删除所述备件消耗数据。
进一步,所述将备件消耗数据存储至第一数据库、第二数据库和第三数据库,其具体包括:
利用消息中间件将备件消耗数据分发至第一数据库、第二数据库和第三数据库;
其中,所述第一数据库、第二数据库和第三数据库互为备份。
进一步,还包括以下步骤:
根据输入获取登录信息;
根据所述登录信息获取对应的用户信息;
根据所述登录信息和用户信息进行用户登录验证。
进一步,还包括以下步骤:
根据所述用户信息初始化用户界面,所述用户信息包括历史查询信息和工位管理信息。
进一步,所述工位,通过以下至少一个步骤进行获取:
根据输入的关键字在工位数据库搜索匹配度超过阈值的工位数据;展示所述工位数据,根据选择获取工位;
将工位按照所在位置生成位置节点,展示所述工位的所在位置节点,根据选择获取工位。
本发明所采用的第二技术方案是:
一种备件消耗数据查询系统,包括:
输入模块,用于根据输入获取备件消耗数据查询的时间范围、备件类型和工位;
分时模块,用于将所述时间范围按照第一时间阈值和第二时间阈值分为若干时间区间;
提取模块,用于确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据;确定所述时间范 围存在大于第一时间阈值且小于等于第二时间阈值的第二时间区间,从第二数据库中获取所述工位在第二时间区间内所述备件类型的备件的消耗数据;确定所述时间范围存在大于第二时间阈值第三时间区间,从第三数据库中获取所述工位在第三时间区间内所述备件类型的备件的消耗数据。
本发明所采用的第三技术方案是:
一种备件消耗数据查询系统,包括:
存储器,用于存储程序;
处理器,用于加载所述程序以执行所述的一种备件消耗数据查询方法。
本发明所采用的第四技术方案是:
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现所述的一种备件消耗数据查询方法。
与现有技术相比较,本发明将备件消耗数据按照实时性要求分别存储到第一数据库、第二数据库和第三数据库,按照查询的时间范围分别从第一数据库、第二数据库和第三数据库中提取备件消耗数据,相比于传统的数据库存储和查询具有更高的查询性能,满足了备件消耗数据查询的实时性。
附图说明
图1为本发明实施例一种备件消耗数据查询方法的第一流程图;
图2为本发明实施例一种备件消耗数据查询方法的第二流程图;
图3为本发明实施例一种备件消耗数据查询方法的GUI图;
图4为本发明实施例一种备件消耗数据查询系统的第一结构图;
图5为本发明实施例一种备件消耗数据查询系统的第二结构图。
具体实施方式
以下将结合实施例和附图对本发明的构思、具体结构及产生的技术效果进行清楚、完整的描述,以充分地理解本发明的目的、方案和效果。
本发明实施例提供了一种备件消耗数据查询方法,参照图2,包括:
S10、根据输入获取备件消耗数据查询的时间范围、备件类型和工位;
S20、将所述时间范围按照第一时间阈值和第二时间阈值分为若干时间区间;
S30、确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据;
S40、确定所述时间范围存在大于第一时间阈值且小于等于第二时间阈值的第二时间区 间,从第二数据库中获取所述工位在第二时间区间内所述备件类型的备件的消耗数据;
S50、确定所述时间范围存在大于第二时间阈值第三时间区间,从第三数据库中获取所述工位在第三时间区间内所述备件类型的备件的消耗数据。
具体地,参照图1,在第一数据库、第二数据库和第三数据库中存储备件消耗数据,通过限定的查询时间范围分别从不同的数据库汇总提取备件消耗数据,相比于原有的出入库系统,极大提高了备件消耗数据的查询性能。
为了缩短设备修理停歇时间或进行设备的维护检修,而储备的用于维修的配件,叫做备件,备件消耗数据用于记录备件消耗情况。
时间范围,用于限定备件消耗数据的查询时间范围,用户可以通过选定时间范围来查询指定时间范围内的备件消耗情况;备件类型,用于限定查询的备件类型。工位是生产过程最基本的生产单元,在工位上安排人员、设备、原料工具进行生产装配。通过工位进行备件消耗统计可以细化到工位进行备件消耗分析,以工位为基础提高备件使用率。
第一时间阈值和第二时间阈值将指定的查询时间范围分割为第一时间区间、第二时间区间和第三时间区间;小于等于第一时间阈值的时间范围为第一时间区间,小于等于第二时间阈值且大于第一时间阈值的时间范围为第二时间区间;大于第二时间阈值的时间范围为第三时间区间。第一数据库存储有第一时间范围的数据,第二数据库存储有第一时间范围和第二时间范围的数据,第三数据库存储有第一时间范围、第二时间范围和第三时间范围的数据。第一数据库的响应速度最快,第二数据库的响应速度次之,第三数据库的响应速度最慢。因此第一时间区间的备件消耗数据从第一数据库中获取,第二时间区间的备件消耗数据从第二数据库获取,第三时间区间的备件消耗数据从第三数据库获取。通过使用高响应速度的数据库来获取实时要求更高的备件消耗数据,提高了备件消耗数据的查询性能。
第一数据库可以为缓存数据库,缓存数据库的数据并非存放在数据库里,而是缓存在内存中,因此缓存数据库的响应速度很快,但其也会占用大量的内存资源,在本实施例中第一数据库中存放的是实时要求较高的数据,一般为30s内采集到的数据。
第二数据库可以为时序数据库,时序数据库全称为时间序列数据库。时间序列数据库主要用于指处理带时间标签的数据,带时间标签的数据也称为时间序列数据。对于时序大数据的存储和处理往往采用关系型数据库的方式进行处理,但由于关系型数据库天生的劣势导致其无法进行高效的存储和数据的查询。时序大数据解决方案通过使用特殊的存储方式,使得时序大数据可以高效存储和快速处理海量时序大数据,是解决海量数据处理的一项重要技术。在本实施例中第二数据库中存放的是使用频率较高的数据,一般为30天内采集到的数据。
第三数据库可以是关系数据库,关系数据库是建立在关系数据库模型基础上的数据库,借助于集合代数等概念和方法来处理数据库中的数据,同时也是一个被组织成一组拥有正式描述性的表格,该形式的表格作用的实质是装载着数据项的特殊收集体,这些表格中的数据能以许多不同的方式被存取或重新召集而不需要重新组织数据库表格。在本实施例中第三数据库中存放的是所有的备件消耗数据,由于备件消耗数据会一直叠加,第三数据库的查询效率会逐渐降低。
进一步作为可选的实施方式,所述确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据,包括以下步骤:
确定所述时间范围存在小于等于第一时间阈值的第一时间区间,实时从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据。
具体地,实时从第一数据库获取备件消耗数据,依据得到的备件消耗数据动态绘制备件消耗图表。相比于静态获取备件消耗数据的方式,动态获取备件消耗数据可以使得用户实时得知备件消耗状态。
进一步作为可选的实施方式,还包括以下步骤:
采集备件消耗数据,将备件消耗数据存储至第一数据库、第二数据库和第三数据库;
确定所述备件消耗数据的存放时间超过第一时间阈值,在第一数据库中删除所述备件消耗数据;
确定所述备件消耗数据的存放时间超过第二时间阈值,在第二数据库中删除所述备件消耗数据。
具体地,由于第一数据库和第二数据库对应数据库响应速度的要求较高,需要限制第一数据库和第二数据库中存储的数据容量。通过在第一数据库中删除超过第一时间阈值的数据,在第二数据库中删除超过第二时间阈值的数据,减少了第一数据库和第二数据库的数据量,提高了数据库的检索效率,从而提高了数据库的查询响应效率。
进一步作为可选的实施方式,所述将备件消耗数据存储至第一数据库、第二数据库和第三数据库,其具体包括:
利用消息中间件将备件消耗数据分发至第一数据库、第二数据库和第三数据库;
其中,所述第一数据库、第二数据库和第三数据库互为备份。
具体地,消息中间件利用高效可靠的消息传递机制进行平台无关的数据交流,并基于数据通信来进行分布式系统的集成。通过提供消息传递和消息排队模型,它可以在分布式环境 下扩展进程间的通信。通过消息中间件可以分布式地将备件消耗数据存储到三个不同的数据库中,提高数据存储的效率。
通过将第一数据库、第二数据库和第三数据库互相作为备份,在某个数据库中数据出错的情况下可以从其他数据库中进行查询获取数据,提高了数据库存储的鲁棒性。
进一步作为可选的实施方式,还包括以下步骤:
根据输入获取登录信息;
根据所述登录信息获取对应的用户信息;
根据所述登录信息和用户信息进行用户登录验证。
具体地,通过登录信息进行用户验证,防止未知用户对备件消耗数据进行侵入式访问,提高了备件消耗数据的安全性。
进一步作为可选的实施方式,还包括以下步骤:
根据所述用户信息初始化用户界面,所述用户信息包括历史查询信息和工位管理信息。
具体地,用户信息包括用户的登录账号、密码、历史查询信息和工位管理信息。
历史查询信息,用户的查询记录会被记录下来,若用户设定为根据历史查询信息初始化。每次重新登录会依据上一次的查询指令,即上一次查询的时间范围、备件和工位进行查询。通过复用历史查询信息,提高了用户使用的便利性。
工位管理信息,每个用户会对应有管理的工位,若用户设定为根据工位管理信息初始化,每次重新登录会依据用户对应管理的工位进行备件消耗数据的展示。
进一步作为可选的实施方式,所述工位,通过以下至少一个步骤进行获取:
根据输入的关键字在工位数据库搜索匹配度超过阈值的工位数据;展示所述工位数据,根据选择获取工位;
将工位按照所在位置生成位置节点,展示所述工位的所在位置节点,根据选择获取工位。
具体地,参照图3,GUI中分为四个区域,分别是工艺树301、绘图区302、报表一览305和其他筛选304。其中,工艺树301用于对工位进行选择,工艺树301提供了两种方式进行工位选择,分别是快速搜索3011和节点选择3012,快速搜索3011用于直接输入关键词进行搜索,GUI会展示相应的关键词搜索结果供用户选中工位;节点选择3012用于根据工位所在位置将工位放置在不同的位置节点下,通过选中不同的位置节点可以查看位置节点下的下一级节点,通过节点的方式以位置对工位进行分类,方便用户快速定位到工位。
绘图区302用于绘制图表,在报表一览305中可以选择图表绘制的样式,例如,可以选 择折线图、饼图或树状图作为展示的样式。显示选择303用于控制绘图区302中对象的显示或者隐藏,由于在工艺树301下可以选择多个工位或者在其他筛选304下可以选择多个备件类型,导致绘图区可以展示多条曲线。用户可以在显示选择303中点击选择需要隐藏的曲线,以便于将不同的备件消耗数据进行对于分析。
其他筛选304包括时间范围和备件类型,用于选择备件消耗数据的时间范围和备件类型。
本发明还提供了一种备件消耗数据查询系统,参照图4,包括:
输入模块401,用于根据输入获取备件消耗数据查询的时间范围、备件类型和工位;
分时模块402,用于将所述时间范围按照第一时间阈值和第二时间阈值分为若干时间区间;
提取模块403,用于确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据;确定所述时间范围存在大于第一时间阈值且小于等于第二时间阈值的第二时间区间,从第二数据库中获取所述工位在第二时间区间内所述备件类型的备件的消耗数据;确定所述时间范围存在大于第二时间阈值第三时间区间,从第三数据库中获取所述工位在第三时间区间内所述备件类型的备件的消耗数据。
具体地,上述方法实施例中的内容均适用于本系统实施例中,本系统实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。
应当认识到,本发明的实施例系统中所包含的层、模块、单元和/或平台等可以由计算机硬件、硬件和软件的组合、或者通过存储在非暂时性计算机可读存储器中的计算机指令来实现或实施。所述方法可以使用标准编程技术-包括配置有计算机程序的非暂时性计算机可读存储介质在计算机程序中实现,其中如此配置的存储介质使得计算机以特定和预定义的方式操作——根据在具体实施例中描述的方法和附图。每个程序可以以高级过程或面向对象的编程语言来实现以与计算机系统通信。然而,若需要,该程序可以以汇编或机器语言实现。在任何情况下,该语言可以是编译或解释的语言。此外,为此目的该程序能够在编程的专用集成电路上运行。
此外,本发明实施例系统中所包含的层、模块、单元和/或平台所对应执行的数据处理流程,其可按任何合适的顺序来执行,除非本文另外指示或以其他方式明显地与上下文矛盾。本发明实施例系统中所包含的层、模块、单元和/或平台所对应执行的数据处理流程可在配置有可执行指令的一个或多个计算机系统的控制下执行,并且可作为共同地在一个或多个处理 器上执行的代码(例如,可执行指令、一个或多个计算机程序或一个或多个应用)、由硬件或其组合来实现。所述计算机程序包括可由一个或多个处理器执行的多个指令。
本发明实施例还提供了一种备件消耗数据查询系统,参照图5,包括:
存储器501,用于存储程序;
处理器502,用于加载所述程序以执行所述的一种备件消耗数据查询方法。
具体地,上述方法实施例中的内容均适用于本系统实施例中,本系统实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。所述系统可以在可操作地连接至合适的任何类型的计算平台中实现,包括但不限于个人电脑、迷你计算机、主框架、工作站、网络或分布式计算环境、单独的或集成的计算机平台、或者与带电粒子工具或其它成像装置通信等等。本发明系统中所包含的层、模块、单元和/或平台所对应执行的数据处理流程可以以存储在非暂时性存储介质或设备上的机器可读代码来实现,无论是可移动的还是集成至计算平台,如硬盘、光学读取和/或写入存储介质、RAM、ROM等,使得其可由可编程计算机读取,当存储介质或设备由计算机读取时可用于配置和操作计算机以执行在此所描述的过程。此外,机器可读代码,或其部分可以通过有线或无线网络传输。当此类媒体包括结合微处理器或其他数据处理器实现上文所述步骤的指令或程序时,本文所述的发明包括这些和其他不同类型的非暂时性计算机可读存储介质。当根据本发明所述的方法和技术编程时,本发明还包括计算机本身。
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现所述的一种备件消耗数据查询方法。
具体地,所述存储介质中存储有处理器可执行的指令,所述处理器可执行的指令在由处理器执行时用于执行上述方法实施例中任一个技术方案所述的一种交互信息处理方法步骤。对于所述存储介质,其可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。可见,上述方法实施例中的内容均适用于本存储介质实施例中,本存储介质实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种元件,但这些元件不应限于这些术语。这些术语仅用来将同一类型的元件彼此区分开。例如,在不脱离本公开范围的情况下,第一元件也可以被称为第二元件,类似地,第二元件也可以被称为第一元件。本文所提供的任何以及所有实例或示例性语言(“例如”、“如”等)的使用仅意图更好地说明本发明的实施例,并且除非另外要求,否则不会对本发明的范围施加限制。
以上所述,只是本发明的较佳实施例而已,本发明并不局限于上述实施方式,只要其以相同的手段达到本发明的技术效果,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。在本发明的保护范围内其技术方案和/或实施方式可以有各种不同的修改和变化。

Claims (10)

  1. 一种备件消耗数据查询方法,其特征在于,包括:
    根据输入获取备件消耗数据查询的时间范围、备件类型和工位;
    将所述时间范围按照第一时间阈值和第二时间阈值分为若干时间区间;
    确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据;
    确定所述时间范围存在大于第一时间阈值且小于等于第二时间阈值的第二时间区间,从第二数据库中获取所述工位在第二时间区间内所述备件类型的备件的消耗数据;
    确定所述时间范围存在大于第二时间阈值第三时间区间,从第三数据库中获取所述工位在第三时间区间内所述备件类型的备件的消耗数据。
  2. 根据权利要求1所述的一种备件消耗数据查询方法,其特征在于,所述确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据,包括以下步骤:
    确定所述时间范围存在小于等于第一时间阈值的第一时间区间,实时从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据。
  3. 根据权利要求1所述的一种备件消耗数据查询方法,其特征在于,还包括以下步骤:
    采集备件消耗数据,将备件消耗数据存储至第一数据库、第二数据库和第三数据库;
    确定所述备件消耗数据的存放时间超过第一时间阈值,在第一数据库中删除所述备件消耗数据;
    确定所述备件消耗数据的存放时间超过第二时间阈值,在第二数据库中删除所述备件消耗数据。
  4. 根据权利要求3所述的一种备件消耗数据查询方法,其特征在于,所述将备件消耗数据存储至第一数据库、第二数据库和第三数据库,其具体包括:
    利用消息中间件将备件消耗数据分发至第一数据库、第二数据库和第三数据库;
    其中,所述第一数据库、第二数据库和第三数据库互为备份。
  5. 根据权利要求1所述的一种备件消耗数据查询方法,其特征在于,还包括以下步骤:
    根据输入获取登录信息;
    根据所述登录信息获取对应的用户信息;
    根据所述登录信息和用户信息进行用户登录验证。
  6. 根据权利要求5所述的一种备件消耗数据查询方法,其特征在于,还包括以下步骤:
    根据所述用户信息初始化用户界面,所述用户信息包括历史查询信息和工位管理信 息。
  7. 根据权利要求1所述的一种备件消耗数据查询方法,其特征在于,所述工位,通过以下至少一个步骤进行获取:
    根据输入的关键字在工位数据库搜索匹配度超过阈值的工位数据;展示所述工位数据,根据选择获取工位;
    将工位按照所在位置生成位置节点,展示所述工位的所在位置节点,根据选择获取工位。
  8. 一种备件消耗数据查询系统,其特征在于,包括:
    输入模块,用于根据输入获取备件消耗数据查询的时间范围、备件类型和工位;
    分时模块,用于将所述时间范围按照第一时间阈值和第二时间阈值分为若干时间区间;
    提取模块,用于确定所述时间范围存在小于等于第一时间阈值的第一时间区间,从第一数据库中获取所述工位在第一时间区间内所述备件类型的备件的消耗数据;确定所述时间范围存在大于第一时间阈值且小于等于第二时间阈值的第二时间区间,从第二数据库中获取所述工位在第二时间区间内所述备件类型的备件的消耗数据;确定所述时间范围存在大于第二时间阈值第三时间区间,从第三数据库中获取所述工位在第三时间区间内所述备件类型的备件的消耗数据。
  9. 一种备件消耗数据查询系统,其特征在于,包括:
    存储器,用于存储程序;
    处理器,用于加载所述程序以执行如权利要求1-7任一项所述的一种备件消耗数据查询方法。
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-7任一项所述的一种备件消耗数据查询方法。
PCT/CN2020/140082 2020-11-02 2020-12-28 一种备件消耗数据查询方法、系统和存储介质 WO2022088466A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011202569.8 2020-11-02
CN202011202569.8A CN112487047A (zh) 2020-11-02 2020-11-02 一种备件消耗数据查询方法、系统和存储介质

Publications (1)

Publication Number Publication Date
WO2022088466A1 true WO2022088466A1 (zh) 2022-05-05

Family

ID=74927834

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/140082 WO2022088466A1 (zh) 2020-11-02 2020-12-28 一种备件消耗数据查询方法、系统和存储介质

Country Status (2)

Country Link
CN (1) CN112487047A (zh)
WO (1) WO2022088466A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407190A (zh) * 2015-07-27 2017-02-15 阿里巴巴集团控股有限公司 一种事件记录查询方法及装置
US20180060386A1 (en) * 2016-08-29 2018-03-01 International Business Machines Corporation Efficient processing of data extents
CN109684358A (zh) * 2017-10-18 2019-04-26 北京京东尚科信息技术有限公司 数据查询的方法和装置
US20200050694A1 (en) * 2018-08-13 2020-02-13 Amazon Technologies, Inc. Burst Performance of Database Queries According to Query Size
CN111046081A (zh) * 2019-12-06 2020-04-21 宁波和利时智能科技有限公司 一种工业时序数据的访问方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216821B (zh) * 2007-01-05 2010-06-16 中兴通讯股份有限公司 数据采集系统的存储管理方法
CN108009767A (zh) * 2017-11-08 2018-05-08 国家电网公司 基于消缺导向的备品备件管理系统及终端设备
CN110727702B (zh) * 2019-09-16 2024-01-26 平安科技(深圳)有限公司 数据查询方法、装置、终端和计算机可读存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407190A (zh) * 2015-07-27 2017-02-15 阿里巴巴集团控股有限公司 一种事件记录查询方法及装置
US20180060386A1 (en) * 2016-08-29 2018-03-01 International Business Machines Corporation Efficient processing of data extents
CN109684358A (zh) * 2017-10-18 2019-04-26 北京京东尚科信息技术有限公司 数据查询的方法和装置
US20200050694A1 (en) * 2018-08-13 2020-02-13 Amazon Technologies, Inc. Burst Performance of Database Queries According to Query Size
CN111046081A (zh) * 2019-12-06 2020-04-21 宁波和利时智能科技有限公司 一种工业时序数据的访问方法及系统

Also Published As

Publication number Publication date
CN112487047A (zh) 2021-03-12

Similar Documents

Publication Publication Date Title
US11941017B2 (en) Event driven extract, transform, load (ETL) processing
KR102627690B1 (ko) Sql 질의 플랜들을 최적화하기 위한 차원 콘텍스트 전파 기술들
Kadadi et al. Challenges of data integration and interoperability in big data
US11868373B2 (en) Method and apparatus for monitoring an in-memory computer system
CN107315776B (zh) 一种基于云计算的数据管理系统
JP6117378B2 (ja) 分散型データベースクエリ・エンジン用のシステムおよび方法
US9135280B2 (en) Grouping interdependent fields
US9372765B2 (en) System and method for recovering system status consistently to designed recovering time point in distributed database
US20110072008A1 (en) Query Optimization with Awareness of Limited Resource Usage
CN102779138B (zh) 实时数据的硬盘存取方法
CN104978324B (zh) 一种数据处理方法和装置
CN104361022A (zh) 一种基于采集数据统计以及前台展现的方法
US11036740B2 (en) Database management system query plan cache management
Dagade et al. Big data weather analytics using hadoop
US11755581B2 (en) Cutoffs for pruning of database queries
CN111708895B (zh) 一种知识图谱系统的构建方法及装置
JP6642435B2 (ja) データ処理装置、データ処理方法、及び、プログラム
WO2022088466A1 (zh) 一种备件消耗数据查询方法、系统和存储介质
US10909117B2 (en) Multiple measurements aggregated at multiple levels of execution of a workload
CN102779097B (zh) 流程数据的内存存取方法
JP6201053B2 (ja) 素性データ管理システム、および素性データ管理方法
Prashanthi et al. Generating analytics from web log
Jia et al. Research on real time data warehouse architecture
CN111399838A (zh) 一种基于SparkSQL和物化视图的数据建模方法及装置
CN109492004A (zh) 一种数字渔业异构数据存储方法、系统及装置

Legal Events

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

Ref document number: 20959623

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20959623

Country of ref document: EP

Kind code of ref document: A1