A method of proxying a cutting plane of a dictionary in a corrugated paper packaging industry and related apparatus
By splitting the dictionary table for the corrugated paper packaging industry into two parts, business and system, and managing the cache and database respectively, the system instability and database pressure caused by user modifications were resolved, thereby improving system performance and maintenance efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the dictionary tables in the corrugated paper packaging industry are easily modified by users, leading to system instability and excessive database pressure caused by a large number of page requests, which affects system performance.
The dictionary table is split into a business dictionary table and a system dictionary table. The system dictionary table is stored in a Redis cache, while the business dictionary table queries the database. List data is captured through custom annotations and dictionary aspect proxies. The data source is determined based on the identifier to obtain the target data and encapsulate it to return to the front-end page. A cold and hot data algorithm is used to manage the cache.
It reduces redundant code, alleviates database pressure, improves system performance and stability, reduces system blocking, and increases maintenance efficiency.
Smart Images

Figure CN115563125B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent manufacturing, in particular to a dictionary proxy cutting method and system for the corrugated paper packaging industry, a terminal and a computer readable storage medium. BACKGROUND
[0002] Corrugated paper is a board-shaped object formed by bonding face paper and corrugated paper in a wave shape processed by a corrugated roller, generally divided into single corrugated paper board and double corrugated paper board, and divided into five types of A, B, C, E and F according to the size of the corrugation. The invention and application of corrugated paper has a history of more than 100 years, and has the advantages of low cost, light weight, easy processing, high strength, excellent printing adaptability, and convenient storage and transportation. More than 80% of corrugated paper can be recycled, and corrugated paper can be used for packaging of food or digital products, is relatively environmentally friendly, and is widely used.
[0003] With the advent of Industry 4.0, smart factories are imminent; the production line of the corrugated paper packaging industry will become more and more intelligent over time; the improvement of production efficiency needs more intelligent systems to support; therefore, the solution of the smart factory is more and more perfect, and the system is also more and more large, and at each place where the machine code is referenced, the interface of the dictionary table needs to be called to convert the mechanical code and the name, the code is too redundant, which causes a large amount of repeated code; because the system is more and more large, the microservices are more and more, and some configurations of the system and for each state are also put into the dictionary table for management.
[0004] The existing problems are that the dictionary table is given to the user operation, the user can change the system state configuration information, and after the data is modified, the running of the entire system is affected; in addition, a large number of page requests to the database will cause the blocking of the system and increase the pressure of the database.
[0005] Therefore, the prior art still needs to be improved and developed. SUMMARY
[0006] The main purpose of the present application is to provide a dictionary proxy cutting method for the corrugated paper packaging industry and related equipment, which aims to solve the problem that the user can change the system data in the prior art and the large amount of code redundancy causes the database pressure to be large, and the overall system performance is slow.
[0007] To achieve the above purpose, the present application provides a dictionary proxy cutting method for the corrugated paper packaging industry, which comprises the following steps:
[0008] Obtaining parameters, mechanical codes and names of each device, and establishing a dictionary table based on the parameters, the mechanical codes and the names;
[0009] Split the dictionary table to obtain a business dictionary table and a system dictionary table, and perform self-defined annotation on the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation;
[0010] Capture list data of the dictionary table based on a dictionary aspect proxy, and obtain an identifier of the list data based on the first list annotation and the second list annotation;
[0011] Obtain target data based on the identifier, and encapsulate and return the data to a front-end page.
[0012] Optionally, the dictionary proxy aspect method for the corrugated paper packaging industry, wherein the splitting of the dictionary table to obtain a business dictionary table and a system dictionary table, and the self-defined annotation on the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation, specifically comprises:
[0013] Obtain a reference amount of a business, and split the dictionary table based on the size of the reference amount;
[0014] Separately divide a business with a large reference amount and a business with a small reference amount into a business dictionary table and a system dictionary table, and store the system dictionary table and general standard data to a redis cache, wherein the business dictionary table is used to query a database;
[0015] Perform self-defined annotation on the business dictionary table and the system dictionary table respectively to obtain a first annotation list and a second list annotation.
[0016] Optionally, the dictionary proxy aspect method for the corrugated paper packaging industry, wherein the capturing of list data of the dictionary table based on a dictionary aspect proxy, and the obtaining of an identifier of the list data based on the first list annotation and the second list annotation, specifically comprises:
[0017] Predefine a dictionary proxy aspect, and capture list data of the dictionary table based on the dictionary aspect proxy;
[0018] Extract an encoding value of the list data based on the first list annotation and the second list annotation, and obtain an identifier of the list data according to the encoding value.
[0019] Optionally, the dictionary proxy aspect method for the corrugated paper packaging industry, wherein the obtaining of target data based on the identifier, and the encapsulation and return of the data to a front-end page, specifically comprises:
[0020] Judge the source of data based on the identifier;
[0021] If the data is from the system dictionary table, target data in redis cache is obtained based on encoding of the data;
[0022] If the data is from the business dictionary table, target data is obtained by querying a database;
[0023] Machine encoding in the target data is extracted, the machine encoding is converted into corresponding names, and the names are returned to a front-end page.
[0024] Optionally, the dictionary proxy aspect method for the corrugated paper packaging industry further includes the following steps:
[0025] An access threshold of machine encoding is set in advance, and whether the machine encoding is hot data is judged based on the threshold;
[0026] If the access quantity of a certain machine encoding reaches the access threshold, the machine encoding is identified as hot data, the machine encoding is stored in the redis cache, and an expiration time is set;
[0027] If the access quantity of a certain machine encoding does not reach the access threshold, the machine encoding is identified as non-hot data, and a database is queried.
[0028] Optionally, the dictionary proxy aspect method for the corrugated paper packaging industry further includes the following steps:
[0029] If the time of the machine encoding in the redis cache reaches the expiration time, whether the machine encoding is still hot data is judged;
[0030] If the machine encoding is still hot data, the expiration time is automatically renewed;
[0031] If the machine encoding is non-hot data, the machine encoding is removed from the redis cache.
[0032] Optionally, the dictionary proxy aspect method for the corrugated paper packaging industry further includes the following steps:
[0033] In addition, to achieve the above object, the application further provides a dictionary proxy aspect system for the corrugated paper packaging industry, wherein the dictionary proxy aspect system for the corrugated paper packaging industry comprises:
[0034] The dictionary table establishing module is configured to acquire parameters, mechanical codes and names of each device, and establish a dictionary table based on the parameters, the mechanical codes and the names.
[0035] The dictionary table processing module is configured to split the dictionary table to obtain a business dictionary table and a system dictionary table, and perform self-defined annotation on the business dictionary table and the system dictionary table to obtain a first list annotation and a second list annotation.
[0036] The data acquisition module is configured to capture list data of the dictionary table based on a dictionary aspect agent, and obtain identifiers of the list data based on the first list annotation and the second list annotation.
[0037] The data encapsulation module is configured to acquire target data based on the identifiers, and encapsulate and return the data to a front-end page.
[0038] In addition, to achieve the above object, the present application further provides an intelligent terminal, which comprises a memory, a processor and a dictionary agent aspect program for the corrugated paper packaging industry stored in the memory and capable of running on the processor, and the dictionary agent aspect program for the corrugated paper packaging industry implements the steps of the dictionary agent aspect method for the corrugated paper packaging industry when executed by the processor.
[0039] In addition, to achieve the above object, the present application further provides a computer readable storage medium, which stores a dictionary agent aspect program for the corrugated paper packaging industry, and the dictionary agent aspect program for the corrugated paper packaging industry implements the steps of the dictionary agent aspect method for the corrugated paper packaging industry when executed by a processor.
[0040] In the present application, parameters, mechanical codes and names of each device are acquired, and a dictionary table is established based on the parameters, the mechanical codes and the names; the dictionary table is split to obtain a business dictionary table and a system dictionary table, and self-defined annotation is performed on the business dictionary table and the system dictionary table to obtain a first list annotation and a second list annotation; list data of the dictionary table is captured based on a dictionary aspect agent, and identifiers of the list data are obtained based on the first list annotation and the second list annotation; target data is acquired based on the identifiers, and the data is encapsulated and returned to a front-end page. The dictionary table is split into the system dictionary table and the business dictionary table in the present application, and the interface of the dictionary agent aspect is reformed, the system dictionary table is placed in a redis cache, and the business dictionary table is queried from a database, so that a large amount of redundant codes are removed, the database pressure is greatly relieved, and the performance of the overall system is improved. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1This is a flowchart of a preferred embodiment of the dictionary proxy sectioning method for the corrugated paper packaging industry in this invention;
[0042] Figure 2 This is a flowchart of step S20 in a preferred embodiment of the dictionary proxy section method for the corrugated paper packaging industry in this invention;
[0043] Figure 3 This is a flowchart of step S30 in a preferred embodiment of the dictionary proxy section method for the corrugated paper packaging industry in this invention;
[0044] Figure 4 This is a flowchart of step S40 in a preferred embodiment of the dictionary proxy section method for the corrugated paper packaging industry in this invention;
[0045] Figure 5 This is a schematic diagram of the original version of the dictionary proxy section method for the corrugated paper packaging industry in this invention;
[0046] Figure 6 This is a schematic diagram of version 1.0 of the dictionary proxy section method for the corrugated paper packaging industry in this invention;
[0047] Figure 7 This is a schematic diagram of version 2.0 of the dictionary proxy section method for the corrugated paper packaging industry in this invention;
[0048] Figure 8 This is a schematic diagram illustrating the principle of a preferred embodiment of the dictionary proxy cutting system for the corrugated paper packaging industry in this invention;
[0049] Figure 9 This is a schematic diagram of the operating environment of a preferred embodiment of the smart terminal of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0051] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0052] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0053] The preferred embodiment of the dictionary proxy sectioning method for the corrugated paper packaging industry described in this invention, such as... Figure 1 As shown, the dictionary proxy slicing method for the corrugated paper packaging industry includes the following steps:
[0054] Step S10: Obtain the parameters, mechanical codes, and names of each device, and establish a dictionary table based on the parameters, mechanical codes, and names.
[0055] Specifically, in the corrugated paper packaging industry, there are numerous parameters and corresponding machine parameter codes and names for machines. These include equipment types such as printing presses, slotting machines, paper slitting machines, paper cutters, color printing machines, virtual machines, laminating machines, mounting machines, waste removal machines, box stapling machines, and corrugating machines; and ink types such as dark gray, medium gray, light gray, red, black, blue, and red, among others. All these data have corresponding unique codes. Furthermore, many pages and tables in the system require these values. For this scenario, we create a dictionary table to store machine codes and names. Since pages with machine codes and names are pre-entered, and other modules (such as production reporting lists) need to use these machine codes and names, the table only stores machine codes. However, general page list displays require both machine codes and names. Therefore, a common method is needed to uniformly query the database and convert the corresponding names based on the codes.
[0056] Step S20: Split the dictionary table to obtain a business dictionary table and a system dictionary table, and add custom annotations to the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation.
[0057] Please refer to the detailed process. Figure 2 This is a flowchart of step S20 in the dictionary proxy section method for the corrugated paper packaging industry provided by the present invention.
[0058] like Figure 2 As shown, step S20 includes:
[0059] Step S21: Obtain the reference count of the business, and split the dictionary table based on the size of the reference count;
[0060] Step S22: Divide the business with high reference volume and the business with low reference volume into a business dictionary table and a system dictionary table respectively, and store the system dictionary table and the general standard data in the Redis cache. The business dictionary table is used to query the database.
[0061] Step S23: Custom annotations are applied to the business dictionary table and the system dictionary table respectively to obtain the first annotation list and the second list annotation.
[0062] Specifically, as smart factory solutions become more sophisticated and systems grow larger, every time machine codes are referenced, a dictionary interface needs to be called for conversion between machine codes and names. This results in excessive code redundancy, leading to a large amount of repetitive code and significant inconvenience for later maintenance. Changes in requirements also require substantial modifications. To address this, a dictionary proxy aspect was added to handle code and name conversions. An annotation was added to any point in the system where conversion was needed, enabling the conversion. However, as the system grows larger and more microservices emerge, system configurations and state management are also placed in the dictionary table. Therefore, based on industry characteristics, the group enterprise is now data-isolated by factory, and the tenant data sources are initialized and encapsulated into components. Ultimately, each tenant has its own independent microservice system.
[0063] However, two problems exist. Problem 1: The dictionary for each tenant in the entire SaaS system is not the same. Also, some system configuration data, such as language type and schedule status, are stored in the dictionary table. Since the dictionary table is accessible to users, users can modify the system status configuration information, which can affect the operation of the entire system. Problem 2: As the number of tenants continues to increase, the data in the dictionary table will become increasingly large. At this time, multiple tenants and users requesting the interface at the same time will cause system blockage, and a large number of page requests to the database will increase the pressure on the database. To address these two issues, we split the dictionary table. During system initialization, we manually determine which data is frequently referenced by business processes and which is used sparingly. Based on this distinction, we then split the dictionary table into two tables: a business dictionary table and a system dictionary table. The business dictionary table records customer-defined data (data within the customer's company, such as shift schedules, whether it's a three-shift, two-shift, or long day shift) or frequently changing data. The system dictionary table records our system parameters; parameters that customers cannot change or system parameters are placed in the system dictionary table. The system dictionary table is cached in Redis, while the business dictionary table queries the database. Based on industry characteristics, most of the data is universally standardized, and this is also cached in Redis. This data includes equipment type, ink type, die-cutting plate, material category, and process route, among other things.
[0064] Custom annotations are applied to the business dictionary table and the system dictionary table respectively to obtain a first annotation list and a second list of annotations.
[0065] Step S30: Capture the list data of the dictionary table based on the dictionary aspect proxy, and obtain the identifier of the list data based on the first list annotation and the second list annotation.
[0066] Please refer to the detailed process. Figure 3 This is a flowchart of step S30 in the dictionary proxy section method for the corrugated paper packaging industry provided by the present invention.
[0067] like Figure 3 As shown, step S30 includes:
[0068] Step S31: Predefine a dictionary proxy aspect, and capture the list data of the dictionary table based on the dictionary proxy aspect;
[0069] Step S32: Extract the encoding value of the list data based on the first list annotation and the second list annotation, and obtain the identifier of the list data according to the encoding value.
[0070] Specifically, by adding two custom annotations, one for lists and one for fields, a dictionary proxy aspect is predefined. This dictionary aspect proxies and captures list data from the dictionary table. The list annotation captures the list data, while the dictionary annotation captures the fields that need to be converted. An input parameter (an identifier used for identification in the dictionary proxy aspect's methods) is added to the list annotation to identify whether the encoding is from the system dictionary table or the business dictionary table. Then, in the dictionary proxy aspect class, the encoding value of the list data is extracted based on the first and second list annotations, and the identifier of the list data is obtained based on the encoding value.
[0071] Step S40: Obtain target data based on the identifier, and encapsulate the data and return it to the front-end page.
[0072] Please refer to the detailed process. Figure 4 This is a flowchart of step S40 in the dictionary proxy section method for the corrugated paper packaging industry provided by the present invention.
[0073] like Figure 4 As shown, step S40 includes:
[0074] Step S41: Determine the source of the data based on the identifier;
[0075] Step S42: If the data originates from the system dictionary table, then obtain the target data in the Redis cache based on the encoding of the data;
[0076] Step S43: If the data originates from the business dictionary table, then the target data is obtained by querying the database;
[0077] Step S44: Extract the machine code from the target data, convert the machine code into a corresponding name, and return the name to the front-end page.
[0078] Specifically, the source of the data is determined based on the identifier; if the data originates from the system dictionary table, the target data in the Redis cache is obtained based on the encoding of the data; if the data originates from the business dictionary table, the target data is obtained by querying the database; a list is extracted from the target data, the machine codes in the list are extracted, the machine codes are converted into corresponding names, and the names are returned to the front-end page.
[0079] Furthermore, a hot and cold data algorithm is added to the custom annotation. By using the hot and cold data algorithm, the pressure on the database can be reduced. In cases where storing a large amount of cold data in the Redis cache would affect its performance, the pressure on the cache can also be effectively reduced.
[0080] Specifically, an access threshold for machine codes is pre-set, and the system determines whether a machine code is hot data based on the threshold. If the number of accesses to a machine code reaches the access threshold, the machine code is identified as hot data and stored in the Redis cache (for example, if the same code is accessed 2000 times within 5 minutes, it is placed in the cache; this value can be set manually), and an expiration time is set. If the number of accesses to a machine code does not reach the access threshold, the machine code is identified as non-hot data, and the database is queried.
[0081] Then, based on the expiration time set in the Redis cache (the expiration time is the cache expiration time; for example, when a machine code is referenced a lot, the code and name are put in the cache and set to expire in 24 hours), it is determined whether the machine code is still hot data. If the machine code is still hot data, the expiration time is automatically renewed. If the machine code is not hot data, the machine code is removed from the Redis cache.
[0082] Furthermore, due to the numerous parameters and corresponding machine parameter codes and names required by the corrugated packaging industry, and the need for these values across many pages and tables in the system, a dictionary table can be created. In the original version, for example... Figure 5 As shown, factory codes (such as equipment codes, names, flange types, box types, etc.) and name data are placed in a dictionary table. Then, the data containing the dictionary table codes in the interface list data is extracted into a list collection, and a common interface is called (in the system, there is a module whose function is to input machine codes and names on the page, and other modules (such as production work reports) need to use these machine codes and names. Other modules reference machine code data, and the table only stores machine codes, but the general page list display needs to display machine codes and names. At this time, a common interface is needed to query the database to convert the corresponding names based on the codes). A common interface is encapsulated, and a common method is called in each place where it is used, through the code input parameter, and then the database is queried to assign the corresponding code to the corresponding name.
[0083] As the project iterated and the codebase grew larger, with more and more calls to public interfaces, a significant amount of redundant code was added, causing considerable inconvenience for later maintenance. Any changes in requirements resulted in a massive workload for modifications. To address this issue, a dictionary-based proxy aspect model was adopted, upgrading the original version to obtain version 1.0. Figure 6As shown, by adding two annotations, firstly, an annotation is defined on the list parameter to identify that this is a dictionary table, and another annotation is defined on the method body to identify that this is an interface that requires encoding and name conversion. Then, a dictionary proxy aspect class is defined. Then, by capturing the two annotations in the method body, a large amount of calling code is eliminated. By adding annotations to the method body, the database is queried uniformly in the aspect class, and the corresponding encoding is assigned to the corresponding name.
[0084] Finally, as the project iterates and evolves, and more and more smart factory solutions emerge, based on industry characteristics, the group enterprise is divided into tenant data isolation by factory, and the tenant data source is initialized and encapsulated into components. Ultimately, each tenant has its own independent microservice system. Firstly, the dictionary for each tenant in the entire SaaS system is not exactly the same. Secondly, because some system configuration data, such as language type and scheduling status, is also stored in the dictionary table, modifications to this data by customers can affect the operation of the entire system. Finally, as the number of tenants increases, the data in the dictionary table will grow larger and larger. At this point, multiple tenants and multiple users simultaneously requesting the interface will cause system congestion and increase the pressure on the database. To solve the above two problems, an upgrade from version 1.0 was performed to obtain version 2.0, as follows... Figure 7 As shown, the dictionary table is split into a system dictionary table and a business dictionary table. The system dictionary table is placed in the Redis cache. Then, the list custom annotation is modified to add an identifier. The dictionary proxy aspect class is then modified to capture the custom annotation to determine whether to query the cache or the database. Finally, the corresponding code is assigned the corresponding name.
[0085] Furthermore, the following solutions also fall within the scope of protection of this invention: 1. Without splitting the dictionary table, use a single table, connect directly to the database without storing it in the Redis cache, and then perform conversion and assignment using a dictionary proxy; 2. Without splitting the dictionary table, use a single table, store it in the Redis cache, and then perform conversion and assignment using a dictionary proxy aspect; 3. Split the dictionary table, store it in the Redis cache, and then perform conversion and assignment using a dictionary proxy aspect; 4. Split the dictionary table, add two annotations to the method body, write two dictionary proxy aspect classes, and then use different dictionary proxy aspects for different method calls; 5. Split the dictionary table, add an annotation to the method body, write a dictionary proxy aspect, and then add an identifier to the list aspect to distinguish which dictionary table it is, and finally perform conversion and assignment using the dictionary proxy aspect.
[0086] Furthermore, such as Figure 8As shown, based on the above-mentioned dictionary proxy segmentation method for the corrugated paper packaging industry, the present invention also provides a dictionary proxy segmentation system for the corrugated paper packaging industry, wherein the dictionary proxy segmentation system for the corrugated paper packaging industry includes:
[0087] The dictionary table creation module 51 is used to obtain the parameters, mechanical codes and names of each device, and to create a dictionary table based on the parameters, mechanical codes and names;
[0088] The dictionary table processing module 52 is used to split the dictionary table into a business dictionary table and a system dictionary table, and to perform custom annotations on the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation;
[0089] The data acquisition module 53 is used to capture the list data of the dictionary table based on the dictionary aspect proxy, and obtain the identifier of the list data based on the first list annotation and the second list annotation;
[0090] The data encapsulation module 54 is used to obtain target data based on the identifier and encapsulate the data and return it to the front-end page.
[0091] Furthermore, such as Figure 9 As shown, based on the dictionary proxy sectioning method and system for the corrugated paper packaging industry described above, the present invention also provides a corresponding smart terminal, which includes a processor 10, a memory 20, and a display 30. Figure 9 Only some components of the smart terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0092] In some embodiments, the memory 20 may be an internal storage unit of the smart terminal, such as a hard drive or memory. In other embodiments, the memory 20 may be an external storage device of the smart terminal, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the smart terminal. Further, the memory 20 may include both internal and external storage units of the smart terminal. The memory 20 is used to store application software and various types of data installed on the smart terminal, such as the program code installed on the smart terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a dictionary proxy segmentation program 40 for the corrugated paper packaging industry, which can be executed by the processor 10 to implement the dictionary proxy segmentation method for the corrugated paper packaging industry in this application.
[0093] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the dictionary proxy slicing method of the corrugated paper packaging industry.
[0094] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the smart terminal and to display a visual user interface. The components 10-30 of the smart terminal communicate with each other via a system bus.
[0095] In one embodiment, when processor 10 executes dictionary proxy segmentation program 40 for the corrugated packaging industry in memory 20, the following steps are performed:
[0096] Obtain the parameters, mechanical codes, and names of each device, and establish a dictionary table based on the parameters, mechanical codes, and names;
[0097] The dictionary table is split into a business dictionary table and a system dictionary table. Custom annotations are applied to the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation.
[0098] The dictionary-based aspect proxy captures the list data of the dictionary table, and obtains the identifier of the list data based on the first list annotation and the second list annotation;
[0099] The target data is obtained based on the identifier, and the data is encapsulated and returned to the front-end page.
[0100] Specifically, splitting the dictionary table into a business dictionary table and a system dictionary table, and then applying custom annotations to the business dictionary table and the system dictionary table to obtain a first list annotation and a second list annotation, includes:
[0101] Obtain the reference count of the business, and split the dictionary table based on the size of the reference count;
[0102] Businesses with high reference volume and businesses with low reference volume are respectively divided into business dictionary tables and system dictionary tables. The system dictionary table and general standard data are stored in Redis cache. The business dictionary table is used to query the database.
[0103] Custom annotations are applied to the business dictionary table and the system dictionary table respectively to obtain a first annotation list and a second list of annotations.
[0104] Specifically, the step of capturing the list data of the dictionary table based on dictionary aspect proxy and obtaining the identifier of the list data based on the first list annotation and the second list annotation includes:
[0105] A dictionary proxy aspect is predefined, and the list data of the dictionary table is captured based on the dictionary proxy aspect;
[0106] The encoded value of the list data is extracted based on the first list annotation and the second list annotation, and the identifier of the list data is obtained based on the encoded value.
[0107] Specifically, obtaining target data based on the identifier and encapsulating the data to return it to the front-end page includes:
[0108] The source of the data is determined based on the identifier;
[0109] If the data originates from the system dictionary table, then the target data in the Redis cache is obtained based on the encoding of the data;
[0110] If the data originates from the business dictionary table, the target data is obtained by querying the database;
[0111] Extract the machine code from the target data, convert the machine code into a corresponding name, and return the name to the front-end page.
[0112] The step of obtaining data from the Redis cache through encoding further includes:
[0113] A pre-set access threshold for machine codes is used to determine whether the machine codes are hotspot data.
[0114] If the number of accesses to a certain machine code reaches the access threshold, the machine code is marked as hot data, stored in the Redis cache, and an expiration time is set.
[0115] If the number of accesses to a certain machine code does not reach the access threshold, the machine code will be marked as non-hotspot data and the database will be queried.
[0116] The step of storing the machine code in the Redis cache and setting an expiration time further includes:
[0117] If the machine code expires in the Redis cache, it is determined whether the machine code is still hot data.
[0118] If the machine code is still hot data, the expiration time will be automatically renewed;
[0119] If the machine code is non-hotspot data, then the machine code will be removed from the Redis cache.
[0120] The data in the general standard includes equipment type, ink type, die-cutting plate, material category, and process route.
[0121] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a dictionary proxy segmentation program for the corrugated paper packaging industry, and the dictionary proxy segmentation program for the corrugated paper packaging industry, when executed by a processor, implements the steps of the dictionary proxy segmentation method for the corrugated paper packaging industry as described above.
[0122] In summary, the system obtains the parameters, machine codes, and names of each device, and establishes a dictionary table based on these parameters, machine codes, and names. This dictionary table is then split into a business dictionary table and a system dictionary table. Custom annotations are applied to both the business dictionary table and the system dictionary table to obtain a first list annotation and a second list annotation. A dictionary aspect proxy captures the list data from the dictionary tables, and an identifier for the list data is obtained based on the first and second list annotations. The target data is then obtained based on the identifier and encapsulated and returned to the front-end page. This invention splits the dictionary table into a system dictionary table and a business dictionary table, and modifies the interface of the dictionary proxy aspect by storing the system dictionary table in a Redis cache and querying the database for the business dictionary table. This eliminates a large amount of redundant code, significantly reduces database pressure, and improves the overall system performance.
[0123] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0124] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.
[0125] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A dictionary-style cross-section method for the corrugated paper packaging industry, characterized in that, The dictionary-based approach for corrugated paper packaging industry includes: Obtain the parameters, mechanical codes, and names of each device, and establish a dictionary table based on the parameters, mechanical codes, and names; The dictionary table is split into a business dictionary table and a system dictionary table. Custom annotations are applied to the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation. The step of splitting the dictionary table into a business dictionary table and a system dictionary table, and then applying custom annotations to the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation, specifically includes: Obtain the reference count of the business, and split the dictionary table based on the size of the reference count; Businesses with high reference volume and businesses with low reference volume are respectively divided into business dictionary tables and system dictionary tables. The system dictionary table and general standard data are stored in Redis cache. The business dictionary table is used to query the database. Custom annotations are applied to the business dictionary table and the system dictionary table respectively to obtain a first annotation list and a second list of annotations; The dictionary-based aspect proxy captures the list data of the dictionary table, and obtains the identifier of the list data based on the first list annotation and the second list annotation; The step of capturing the list data of the dictionary table based on dictionary aspect proxy, and obtaining the identifier of the list data based on the first list annotation and the second list annotation, specifically includes: A dictionary proxy aspect is predefined, and the list data of the dictionary table is captured based on the dictionary proxy aspect; The encoded value of the list data is extracted based on the first list annotation and the second list annotation, and the identifier of the list data is obtained based on the encoded value; The target data is obtained based on the identifier, and the data is encapsulated and returned to the front-end page.
2. The dictionary proxy sectioning method for the corrugated paper packaging industry according to claim 1, characterized in that, The step of obtaining target data based on the identifier and encapsulating the data and returning it to the front-end page specifically includes: The source of the data is determined based on the identifier; If the data originates from the system dictionary table, then the target data in the Redis cache is obtained based on the encoding of the data; If the data originates from the business dictionary table, the target data is obtained by querying the database; Extract the machine code from the target data, convert the machine code into a corresponding name, and return the name to the front-end page.
3. The dictionary proxy sectioning method for the corrugated paper packaging industry according to claim 2, characterized in that, The process of retrieving data from the Redis cache through encoding also includes: A pre-set access threshold for machine codes is used to determine whether the machine codes are hotspot data. If the number of accesses to a certain machine code reaches the access threshold, the machine code is marked as hot data, stored in the Redis cache, and an expiration time is set. If the number of accesses to a certain machine code does not reach the access threshold, the machine code will be marked as non-hotspot data and the database will be queried.
4. The dictionary proxy sectioning method for the corrugated paper packaging industry according to claim 3, characterized in that, The step of storing the machine code in the Redis cache and setting an expiration time further includes: If the machine code expires in the Redis cache, it is determined whether the machine code is still hot data. If the machine code is still hot data, the expiration time will be automatically renewed; If the machine code is non-hotspot data, then the machine code will be removed from the Redis cache.
5. The dictionary proxy sectioning method for the corrugated paper packaging industry according to claim 1, characterized in that, The data in the general standard includes equipment type, ink type, die-cutting plate, material category, and process route.
6. A system for dictionary proxy cutting in the corrugated paper packaging industry, characterized in that, The system for dictionary proxy sections in the corrugated paper packaging industry is used to implement the method for dictionary proxy sections in the corrugated paper packaging industry according to any one of claims 1-5, and the system for dictionary proxy sections in the corrugated paper packaging industry includes: The dictionary table creation module is used to obtain the parameters, mechanical codes, and names of each device, and to create a dictionary table based on the parameters, mechanical codes, and names; The dictionary table processing module is used to split the dictionary table into a business dictionary table and a system dictionary table, and to perform custom annotations on the business dictionary table and the system dictionary table respectively to obtain a first list annotation and a second list annotation; The data acquisition module is used to capture the list data of the dictionary table based on the dictionary aspect proxy, and to obtain the identifier of the list data based on the first list annotation and the second list annotation; The data encapsulation module is used to obtain target data based on the identifier and encapsulate the data and return it to the front-end page.
7. A smart terminal, characterized in that, The smart terminal includes a memory, a processor, and a dictionary proxy segmentation program for the corrugated paper packaging industry stored in the memory and executable on the processor. When the dictionary proxy segmentation program for the corrugated paper packaging industry is executed by the processor, it implements the steps of the dictionary proxy segmentation method for the corrugated paper packaging industry as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the dictionary proxy slicing method for the corrugated packaging industry as described in any one of claims 1-5.
Citation Information
Patent Citations
Annotation list generation method and electronic equipment
CN102681995A
Data dictionary dynamic processing and updating method for customizing data relationship
CN110347695A