Table header data acquisition method and device, equipment and storage medium
By constructing a data dictionary and judging the data header data based on the data volume, the problem of slow and complexity of table header data acquisition in the prior art is solved, and a faster and safer data acquisition process is achieved.
Patent Information
- Application Number
- CN202510105076.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-04-18
Smart Images

Figure CN119847525A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of front-end development technology, and in particular to a method, device, equipment and storage medium for obtaining table header data. Background Art
[0002] Tables are the most common way to display data in front-end technology, and they play a pivotal role in the page's add, delete, modify, and query functions. The two core elements of a table are key (the part displayed in the table header) and value (the code value corresponding to the table data).
[0003] At present, when front-end developers use tables, the table headers are mostly fixed by front-end developers during code development. In the process of later maintenance of the table, if there are multiple identical tables, it is necessary to use the same code to repeatedly modify multiple pages, and the front-end staff needs to repackage the project for project deployment or the operation and maintenance staff needs to make manual changes in the database. If a complete project has multiple pages that require the same table, it is easy to miss information due to multiple modifications during the change process. In addition, when developers distribute the developed projects as products to multiple parties A, and the parties A need to match different tables according to their business scenarios, the front-end staff also needs to change the code again or the operation and maintenance staff needs to manually maintain the database data. It can be seen that the cumbersome change method is neither professional nor conducive to data security.
[0004] As can be seen from the above, how to improve the speed of obtaining table header data in the process of obtaining table header data is a problem that needs to be solved urgently. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a table header data acquisition method, device, equipment and storage medium, which can improve the speed of acquiring header data and reduce the complexity of acquiring header data. The specific scheme is as follows:
[0006] In a first aspect, the present application provides a method for obtaining table header data, comprising:
[0007] Constructing a data dictionary including a dictionary code and array object data to be obtained, and determining whether the amount of data corresponding to the array object data to be obtained in the data dictionary is greater than a preset data amount threshold; the array object data to be obtained includes header data corresponding to a table to be displayed;
[0008] If the data amount corresponding to the array object data to be obtained in the data dictionary is not greater than the preset data amount threshold, all the array object data to be obtained are obtained through a preset interface, and each of the array object data to be obtained is stored in a local cache, so that the corresponding first target array object data is obtained from the local cache based on the dictionary code corresponding to the table to be displayed on the table page to be displayed;
[0009] If the data volume corresponding to the array object data to be obtained in the data dictionary is greater than the preset data volume threshold, each dictionary code is sent to the preset interface so that the preset interface transmits the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed.
[0010] Optionally, the constructing includes a dictionary encoding and a data dictionary of the array object data to be obtained, including:
[0011] Construct a data dictionary on a preset data dictionary page; the data dictionary includes a dictionary code, array object data to be obtained, a code name, a creation time, a usage location, and a dictionary field;
[0012] Among them, the preset data dictionary page has the functions of querying, adding, editing and deleting the contents in the data dictionary; the label fields and key value fields in the array object data to be obtained correspond one-to-one with the header to be displayed part of the table to be displayed and the corresponding code value.
[0013] Optionally, after acquiring the corresponding first target array object data from the local cache based on the dictionary code corresponding to the table to be displayed on the page of the table to be displayed, the method further includes:
[0014] Acquire feedback information from a user after using the preset data dictionary page, so as to adjust the operation page and function settings corresponding to the preset data dictionary page using the feedback information;
[0015] The page performance of the preset data dictionary page is evaluated by using a preset performance evaluation method to obtain an evaluation result, and the performance parameter corresponding to the preset data dictionary page is adjusted by using the evaluation result.
[0016] Optionally, after constructing the data dictionary including the dictionary code and the array object data to be obtained, the step further includes:
[0017] Determine a first dictionary code corresponding to the page to be displayed based on the page to be displayed, and map a second dictionary code corresponding to the data dictionary with the first dictionary code using a preset mapping rule to obtain a mapping result to be processed;
[0018] The mapping result to be processed is stored in a dictionary encoding document so that the corresponding target mapping result can be obtained from the dictionary encoding document through the table page to be displayed, and then the corresponding array object data to be obtained is obtained from the data dictionary based on the target mapping result; the mapping result is a dictionary encoding corresponding to the page to be displayed and the data dictionary respectively.
[0019] Optionally, the acquiring all the array object data to be acquired through a preset interface includes:
[0020] Verify the identity information of the user on the table page to be displayed to obtain a verification result;
[0021] If the verification result indicates that the user has the access authority corresponding to the array object data to be obtained, accessing and obtaining all the array object data to be obtained through a preset interface;
[0022] If the verification result indicates that the user does not have the access authority corresponding to the array object data to be obtained, the user is prohibited from accessing and obtaining all of the array object data to be obtained.
[0023] Optionally, before constructing the data dictionary including the dictionary encoding and the array object data to be obtained, the step further includes:
[0024] Determine a dictionary encoding rule corresponding to the data dictionary based on user needs; the encoding content corresponding to the dictionary encoding rule complies with a preset dictionary encoding specification;
[0025] The data dictionary is coded and generated by using the dictionary coding rule to obtain a dictionary code corresponding to the data dictionary, and then the table to be displayed is coded and generated by using the dictionary coding rule to obtain a dictionary code corresponding to the data dictionary.
[0026] Optionally, after constructing the data dictionary including the dictionary code and the array object data to be obtained, the step further includes:
[0027] A data backup strategy is determined based on user needs, and then the information in the data dictionary is backed up using the data backup strategy and at a preset backup interval to obtain backup data, and the backup data is stored using a preset data storage method; the preset data storage method includes an offline storage method and an encrypted cloud storage method.
[0028] In a second aspect, the present application provides a table header data acquisition device, comprising:
[0029] A data dictionary construction module is used to construct a data dictionary including a dictionary code and array object data to be obtained, and determine whether the amount of data corresponding to the array object data to be obtained in the data dictionary is greater than a preset data amount threshold; the array object data to be obtained includes header data corresponding to the table to be displayed;
[0030] A first array object data acquisition module is configured to acquire all the array object data to be acquired through a preset interface if the data amount corresponding to the array object data to be acquired in the data dictionary is not greater than the preset data amount threshold, and store each array object data to be acquired in a local cache, so as to acquire the corresponding first target array object data from the local cache based on the dictionary code corresponding to the table to be displayed on the table page to be displayed;
[0031] The second array object data acquisition module is used to send each dictionary code to the preset interface if the data amount corresponding to the array object data to be acquired in the data dictionary is greater than the preset data amount threshold, so that the preset interface can transmit the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed.
[0032] In a third aspect, the present application provides an electronic device, including:
[0033] Memory, used to store computer programs;
[0034] The processor is used to execute the computer program to implement the aforementioned table header data acquisition method.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned table header data acquisition method when executed by a processor.
[0036] As can be seen from the above, before acquiring the table header data, the present application needs to construct a data dictionary including a dictionary code and array object data to be acquired, and determine whether the data amount corresponding to the array object data to be acquired in the data dictionary is greater than the preset data amount threshold; the array object data to be acquired includes the header data corresponding to the table to be displayed; if the data amount corresponding to the array object data to be acquired in the data dictionary is not greater than the preset data amount threshold, all array object data are acquired through a preset interface, and each array object data is stored in a local cache, so that on the table to be displayed page, the corresponding first target array object data is acquired from the local cache based on the dictionary code corresponding to the table to be displayed; if the data amount corresponding to the array object data to be acquired in the data dictionary is greater than the preset data amount threshold, each dictionary code is sent down to the preset interface, so that the preset interface transmits the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed.
[0037] It can be seen that the present application first constructs a data dictionary including a dictionary code and array object data to be obtained, and determines whether the data volume corresponding to the array object data to be obtained in the data dictionary is greater than the preset data volume threshold; the array object data to be obtained includes the header data corresponding to the table to be displayed; then, if the data volume corresponding to the array object data to be obtained in the data dictionary is not greater than the preset data volume threshold, the array object data to be obtained is obtained through a preset interface, and each array object data to be obtained is stored in a local cache, so that the corresponding first target array object data is obtained from the local cache on the table to be displayed page based on the dictionary code corresponding to the table to be displayed; further, if the data volume corresponding to the array object data in the data dictionary is greater than the preset data volume threshold, each dictionary code is sent down to the preset interface, so that the preset interface transmits the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed. In this way, the speed of obtaining the header data is improved, the complexity of obtaining the header data is reduced, and the user experience is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0039] Figure 1 A flow chart of a method for obtaining table header data disclosed in this application;
[0040] Figure 2 This is a schematic diagram of the structure of a table header data acquisition device disclosed in this application;
[0041] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] At present, when front-end developers use tables, the table headers are mostly fixed by the front-end developers during the code development process. In the process of later maintenance of the table, if multiple identical tables are encountered, it is necessary to use the same code to repeatedly modify multiple pages, and the front-end personnel need to repackage for project deployment or the operation and maintenance personnel need to make manual changes in the database. If a complete project has multiple pages that require the same table, it is easy to miss information due to multiple modifications during the change process. To this end, the present application provides a table header data acquisition method that can increase the speed of acquiring header data and reduce the complexity of acquiring header data.
[0044] See also Figure 1 As shown, an embodiment of the present invention discloses a method for obtaining table header data, comprising:
[0045] Step S11, construct a data dictionary including dictionary codes and array object data to be obtained, and determine whether the data volume corresponding to the array object data to be obtained in the data dictionary is greater than a preset data volume threshold; the array object data to be obtained includes header data corresponding to the table to be displayed.
[0046] In this embodiment, a data dictionary needs to be constructed, wherein the data dictionary includes but is not limited to a dictionary code, a code name, a creation time, and a usage location. It is worth mentioning that the field data corresponding to the above fields together constitute the basic data content of the dictionary page, and can be displayed through a flippable table, and the data content on the dictionary page can also be queried, added, edited, deleted, and other data operations can be performed through the dictionary page to facilitate the maintenance and update of the data in the later stage. Specifically, constructing a data dictionary including a dictionary code and array object data to be obtained can include: constructing a data dictionary on a preset data dictionary page; the data dictionary includes a dictionary code, array object data to be obtained, a code name, a creation time, a usage location, and a dictionary field; wherein the preset data dictionary page has the function of querying, adding, editing, and deleting the content in the data dictionary; the label field and the key value field in the array object data to be obtained correspond one-to-one with the header to be displayed part of the table to be displayed and the corresponding code value.
[0047] Furthermore, when the user issues a data operation instruction, the dictionary page needs to determine the user information to determine the corresponding authority of the user using the determination result. In addition, regarding the authority issues of adding, editing and deleting dictionary page data, in a specific implementation, no authority is set for the operation of adding dictionary page data, but the rules used when adding dictionary page data should comply with the dictionary encoding specification to ensure the accuracy and availability of dictionary data; for editing dictionary page data, the authority to modify the dictionary group code and dictionary item code is controlled, while the modification of dictionary values may not restrict the corresponding authority, so as to dynamically update and maintain the table header. Specifically, before constructing a data dictionary including a dictionary code and array object data to be obtained, it may also include: determining a dictionary encoding rule corresponding to the data dictionary based on user needs; the encoding content corresponding to the dictionary encoding rule complies with the preset dictionary encoding specification; using the dictionary encoding rule to perform an encoding generation operation on the data dictionary to obtain a dictionary code corresponding to the data dictionary, and then using the dictionary encoding rule to perform an encoding generation operation on the table to be displayed to obtain a dictionary code corresponding to the data dictionary.
[0048] In this embodiment, in order to better write the dictionary code, the embodiment of the present application stores the constructed dictionary code in a preset dictionary code document, wherein the dictionary code in the preset dictionary code document is a unique value corresponding to the table table id, that is, when the user uses the dictionary page to query data, the table header data content required by the table table can be obtained through the dictionary code. Specifically, after constructing a data dictionary including the dictionary code and the array object data to be obtained, it can also include: determining the corresponding first dictionary code based on the page to be displayed, and mapping the second dictionary code corresponding to the data dictionary with the first dictionary code using the preset mapping rule to obtain the mapping result to be processed; storing the mapping result to be processed in the dictionary code document, so as to obtain the corresponding target mapping result from the dictionary code document through the table page to be displayed, and then obtaining the corresponding array object data to be obtained from the data dictionary based on the target mapping result; the mapping result is the dictionary code corresponding to the page to be displayed and the data dictionary respectively.
[0049] It is worth mentioning that the embodiment of the present application can set an editable pop-up box for the dictionary code in the dictionary page, so as to use the editable pop-up box to maintain the array object data in the data dictionary corresponding to the dictionary code. Among them, the basic data value (i.e. data value) and label (i.e. label) of each object in the array correspond one-to-one to the value and key value (i.e. key value) of the table header.
[0050] In addition, in order to deal with data loss and damage, the embodiment of the present application constructs a data backup strategy and a data recovery strategy. That is, the data in the dictionary page is backed up regularly to ensure that the most recent and stable data state can be restored in the event of an unexpected situation. In addition, the secure storage of backup data is also an important part of the strategy. In a specific implementation, the backup data is stored in an offline storage method or an encrypted cloud storage method to prevent unauthorized data access and data leakage. Specifically, after constructing a data dictionary including a dictionary code and array object data to be obtained, it can also include: determining a data backup strategy based on user needs, and then using the data backup strategy and backing up the information in the data dictionary according to the preset backup interval time to obtain backup data, and using a preset data storage method to store the backup data; the preset data storage method includes an offline storage method and an encrypted cloud storage method.
[0051] Step S12: If the data volume corresponding to the array object data to be obtained in the data dictionary is not greater than the preset data volume threshold, all the array object data to be obtained are obtained through a preset interface, and each array object data to be obtained is stored in a local cache, so that the corresponding first target array object data can be obtained from the local cache based on the dictionary code corresponding to the table to be displayed on the table page to be displayed.
[0052] In this embodiment, since the data dictionary page is closely related to the security and accuracy of all table data in a project, the access rights and editing rights to the data dictionary page need to be controlled by the project super administrator and personnel with specific permission accounts. For ordinary user accounts, the embodiment of this application needs to limit access rights and editing rights, and the super administrator and personnel with access and editing rights need to be responsible for maintaining the security and accuracy of the dictionary data. Specifically, obtaining all array object data to be obtained through a preset interface can include: verifying the identity information of the user on the table page to be displayed to obtain a verification result; if the verification result indicates that the user has the access rights corresponding to the array object data to be obtained, then accessing and obtaining all array object data to be obtained through the preset interface; if the verification result indicates that the user does not have the access rights corresponding to the array object data to be obtained, the user is prohibited from accessing and obtaining all array object data to be obtained.
[0053] Furthermore, due to the difference in the amount of data stored in the data dictionary page, the embodiment of the present application has two optional schemes for using the dictionary data. In the first implementation, when the amount of data stored in the data dictionary page is small and the browser's own cache is idle, after the project is started, the embodiment of the present application can obtain all the dictionary data at once through the back-end interface, and then store the obtained data in the browser cache through the browser's own cache SessionStorage (i.e., a way for the browser to store data), so as to match the specific header data required by the table table through the table page and according to the dictionary code.
[0054] It is worth mentioning that, in the actual application process, the embodiment of the present application requires feedback information from mobile phone users, so as to optimize the data dictionary page function by using the user's feedback information. That is, the embodiment of the present application collects the user's usage experience and suggestions, and uses the user's usage experience and suggestions to continuously optimize the operation interface and function settings of the dictionary page, so that it is more in line with the actual needs of the user. In addition, the embodiment of the present application needs to perform performance evaluation and optimization on the dictionary page at each preset interval to ensure its stability and response speed under high load conditions. Specifically, after obtaining the corresponding first target array object data from the local cache based on the dictionary code corresponding to the table to be displayed on the page of the table to be displayed, it can also include: obtaining feedback information from the user after using the preset data dictionary page, so as to use the feedback information to adjust the operation page and function settings corresponding to the preset data dictionary page; using the preset performance evaluation method to evaluate the page performance of the preset data dictionary page, and obtain the evaluation result, so as to use the evaluation result to adjust the performance parameters corresponding to the preset data dictionary page.
[0055] Step S13: If the data volume corresponding to the array object data to be obtained in the data dictionary is greater than the preset data volume threshold, each dictionary code is sent to the preset interface, so that the preset interface transmits the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed.
[0056] In another specific embodiment, when the amount of data stored in the data dictionary page is large, which makes the browser's own cache unable to bear it, the embodiment of the present application can pass the required dictionary code as a parameter to the back-end interface on the table usage page, so that the back-end interface returns the corresponding data based on the received dictionary code.
[0057] Furthermore, in order to ensure that the operation and maintenance personnel of the data dictionary page can master the functional operations on the data dictionary page, the embodiment of the present application also provides an online support service so that the operation and maintenance personnel can use the online support service to learn and master the usage and maintenance skills of the data dictionary page, thereby improving work efficiency and project management level.
[0058] In addition, during the design and implementation of the data dictionary page, the security and compliance of the data dictionary page are crucial considerations. This embodiment adopts multi-level security protection measures, including but not limited to data encryption, access control and security auditing, to ensure the security and privacy protection of dictionary data.
[0059] It can be seen that the embodiment of the present application first constructs a data dictionary including a dictionary code and array object data to be obtained, and determines whether the data volume corresponding to the array object data to be obtained in the data dictionary is greater than the preset data volume threshold; the array object data to be obtained includes the header data corresponding to the table to be displayed; then, if the data volume corresponding to the array object data to be obtained in the data dictionary is not greater than the preset data volume threshold, the array object data to be obtained is obtained through a preset interface, and each array object data to be obtained is stored in a local cache, so that the corresponding first target array object data is obtained from the local cache on the table to be displayed page based on the dictionary code corresponding to the table to be displayed; further, if the data volume corresponding to the array object data in the data dictionary is greater than the preset data volume threshold, each dictionary code is sent down to the preset interface, so that the preset interface transmits the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed. In this way, the speed of obtaining the header data is improved and the complexity of obtaining the header data is reduced.
[0060] Accordingly, see Figure 2 As shown, the present application also provides a table header data acquisition device, comprising:
[0061] The data dictionary construction module 11 is used to construct a data dictionary including a dictionary code and array object data to be obtained, and determine whether the data volume corresponding to the array object data to be obtained in the data dictionary is greater than a preset data volume threshold; the array object data to be obtained includes header data corresponding to the table to be displayed;
[0062] A first array object data acquisition module 12 is configured to acquire all the array object data to be acquired through a preset interface if the data amount corresponding to the array object data to be acquired in the data dictionary is not greater than the preset data amount threshold, and store each array object data to be acquired in a local cache, so as to acquire the corresponding first target array object data from the local cache based on the dictionary code corresponding to the table to be displayed on the table page to be displayed;
[0063] The second array object data acquisition module 13 is used to send each dictionary code to the preset interface if the data volume corresponding to the array object data to be acquired in the data dictionary is greater than the preset data volume threshold, so that the preset interface can transmit the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed.
[0064] As can be seen from the above, before acquiring the table header data, the embodiment of the present application first needs to construct a data dictionary including a dictionary code and the array object data to be acquired, and determine whether the data volume corresponding to the array object data to be acquired in the data dictionary is greater than the preset data volume threshold; the array object data to be acquired includes the header data corresponding to the table to be displayed; then, if the data volume corresponding to the array object data to be acquired in the data dictionary is not greater than the preset data volume threshold, the array object data to be acquired is acquired through a preset interface, and each array object data to be acquired is stored in a local cache, so that the corresponding first target array object data is acquired from the local cache on the table to be displayed page based on the dictionary code corresponding to the table to be displayed; further, if the data volume corresponding to the array object data in the data dictionary is greater than the preset data volume threshold, each dictionary code is sent to the preset interface, so that the preset interface transmits the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed. In this way, the speed of acquiring the header data is improved and the complexity of acquiring the header data is reduced.
[0065] In some specific implementations, the table header data acquisition device may further include:
[0066] In some specific implementations, the data dictionary construction module 11 may specifically include:
[0067] A data dictionary construction subunit is used to construct a data dictionary on a preset data dictionary page; the data dictionary includes a dictionary code, array object data to be obtained, a code name, a creation time, a usage location, and a dictionary field; wherein the preset data dictionary page has the functions of querying, adding, editing, and deleting the content in the data dictionary; the label field and the key value field in the array object data to be obtained correspond one-to-one with the header part to be displayed in the table to be displayed and the corresponding code value.
[0068] In some specific implementations, the table header data acquisition device may further include:
[0069] A data dictionary page adjustment unit, used to obtain feedback information from a user after using the preset data dictionary page, so as to adjust the operation page and function settings corresponding to the preset data dictionary page using the feedback information;
[0070] The performance parameter adjustment unit is used to evaluate the page performance of the preset data dictionary page using a preset performance evaluation method to obtain an evaluation result, so as to adjust the performance parameter corresponding to the preset data dictionary page using the evaluation result.
[0071] In some specific implementations, the table header data acquisition device may further include:
[0072] A mapping result determination unit, configured to determine a corresponding first dictionary code based on the page to be displayed, and map a second dictionary code corresponding to the data dictionary with the first dictionary code using a preset mapping rule to obtain a mapping result to be processed;
[0073] The first array object data acquisition unit is used to store the mapping result to be processed into a dictionary code document so as to obtain the corresponding target mapping result from the dictionary code document through the table page to be displayed, and then obtain the corresponding array object data to be obtained from the data dictionary based on the target mapping result; the mapping result is a dictionary code corresponding to the page to be displayed and the data dictionary respectively.
[0074] In some specific implementations, the first array object data acquisition module 12 may specifically include:
[0075] A verification result determination unit, used to verify the identity information of the user on the table page to be displayed to obtain a verification result;
[0076] A second array object data acquisition unit, configured to access and acquire all of the array object data to be acquired through a preset interface if the verification result indicates that the user has access rights corresponding to the array object data to be acquired;
[0077] The user operation prohibition unit is used to prohibit the user from accessing and obtaining all the array object data to be obtained if the verification result indicates that the user does not have the access authority corresponding to the array object data to be obtained.
[0078] In some specific implementations, the table header data acquisition device may further include:
[0079] A dictionary encoding rule determination unit, used to determine a dictionary encoding rule corresponding to the data dictionary based on user requirements; the encoding content corresponding to the dictionary encoding rule conforms to a preset dictionary encoding specification;
[0080] The dictionary code generating unit is used to perform a code generating operation on the data dictionary using the dictionary code rule to obtain a dictionary code corresponding to the data dictionary, and then perform a code generating operation on the table to be displayed using the dictionary code rule to obtain a dictionary code corresponding to the data dictionary.
[0081] In some specific implementations, the table header data acquisition device may further include:
[0082] A data backup unit is used to determine a data backup strategy based on user needs, and then use the data backup strategy to back up the information in the data dictionary according to a preset backup interval to obtain backup data, and store the backup data using a preset data storage method; the preset data storage method includes an offline storage method and an encrypted cloud storage method.
[0083] Furthermore, the present application also discloses an electronic device. Figure 3 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the table header data acquisition method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0084] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0085] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0086] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the table header data acquisition method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0087] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed table header data acquisition method. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0088] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0089] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0090] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0091] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0092] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for obtaining table header data, characterized in that: include: Constructing a data dictionary including a dictionary code and array object data to be obtained, and determining whether the amount of data corresponding to the array object data to be obtained in the data dictionary is greater than a preset data amount threshold; The array object data to be obtained includes header data corresponding to the table to be displayed; If the data amount corresponding to the array object data to be obtained in the data dictionary is not greater than the preset data amount threshold, all the array object data to be obtained are obtained through a preset interface, and each of the array object data to be obtained is stored in a local cache, so that the corresponding first target array object data is obtained from the local cache based on the dictionary code corresponding to the table to be displayed on the table page to be displayed; If the data volume corresponding to the array object data to be obtained in the data dictionary is greater than the preset data volume threshold, each dictionary code is sent to the preset interface so that the preset interface transmits the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed.
2. The method for obtaining table header data according to claim 1, characterized in that: The construction includes a data dictionary including dictionary codes and array object data to be obtained, including: Construct a data dictionary on a preset data dictionary page; the data dictionary includes a dictionary code, array object data to be obtained, a code name, a creation time, a usage location, and a dictionary field; Among them, the preset data dictionary page has the functions of querying, adding, editing and deleting the contents in the data dictionary; the label fields and key value fields in the array object data to be obtained correspond one-to-one with the header to be displayed part of the table to be displayed and the corresponding code value.
3. The method for obtaining table header data according to claim 2, characterized in that: After acquiring the corresponding first target array object data from the local cache based on the dictionary code corresponding to the table to be displayed on the table page to be displayed, the method further includes: Acquire feedback information from a user after using the preset data dictionary page, so as to adjust the operation page and function settings corresponding to the preset data dictionary page using the feedback information; The page performance of the preset data dictionary page is evaluated by using a preset performance evaluation method to obtain an evaluation result, and the performance parameter corresponding to the preset data dictionary page is adjusted by using the evaluation result.
4. The method for obtaining table header data according to claim 1, characterized in that: After constructing the data dictionary including the dictionary code and the array object data to be obtained, the following further includes: Determine a first dictionary code corresponding to the page to be displayed based on the page to be displayed, and map a second dictionary code corresponding to the data dictionary with the first dictionary code using a preset mapping rule to obtain a mapping result to be processed; The mapping result to be processed is stored in a dictionary encoding document so that the corresponding target mapping result can be obtained from the dictionary encoding document through the table page to be displayed, and then the corresponding array object data to be obtained is obtained from the data dictionary based on the target mapping result; the mapping result is a dictionary encoding corresponding to the page to be displayed and the data dictionary respectively.
5. The method for obtaining table header data according to claim 1, characterized in that: The obtaining of all the array object data to be obtained through a preset interface includes: Verify the identity information of the user on the table page to be displayed to obtain a verification result; If the verification result indicates that the user has the access authority corresponding to the array object data to be obtained, accessing and obtaining all the array object data to be obtained through a preset interface; If the verification result indicates that the user does not have the access authority corresponding to the array object data to be obtained, the user is prohibited from accessing and obtaining all of the array object data to be obtained.
6. The method for obtaining table header data according to claim 1, characterized in that: Before constructing the data dictionary including the dictionary encoding and the array object data to be obtained, the following is also included: Determine a dictionary encoding rule corresponding to the data dictionary based on user needs; the encoding content corresponding to the dictionary encoding rule complies with a preset dictionary encoding specification; The data dictionary is coded and generated by using the dictionary coding rule to obtain a dictionary code corresponding to the data dictionary, and then the table to be displayed is coded and generated by using the dictionary coding rule to obtain a dictionary code corresponding to the data dictionary.
7. The method for obtaining table header data according to any one of claims 1 to 6, characterized in that: After constructing the data dictionary including the dictionary code and the array object data to be obtained, the following further includes: A data backup strategy is determined based on user needs, and then the information in the data dictionary is backed up using the data backup strategy and at a preset backup interval to obtain backup data, and the backup data is stored using a preset data storage method; the preset data storage method includes an offline storage method and an encrypted cloud storage method.
8. A table header data acquisition device, characterized in that: include: A data dictionary construction module is used to construct a data dictionary including a dictionary code and array object data to be obtained, and determine whether the data volume corresponding to the array object data to be obtained in the data dictionary is greater than a preset data volume threshold; The array object data to be obtained includes header data corresponding to the table to be displayed; A first array object data acquisition module is configured to acquire all the array object data to be acquired through a preset interface if the data amount corresponding to the array object data to be acquired in the data dictionary is not greater than the preset data amount threshold, and store each array object data to be acquired in a local cache, so as to acquire the corresponding first target array object data from the local cache based on the dictionary code corresponding to the table to be displayed on the table page to be displayed; The second array object data acquisition module is used to send each dictionary code to the preset interface if the data amount corresponding to the array object data to be acquired in the data dictionary is greater than the preset data amount threshold, so that the preset interface can transmit the corresponding second target array object data to the table to be displayed in the table to be displayed page based on the dictionary code corresponding to the table to be displayed.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the method for obtaining table header data as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the steps of the method for obtaining table header data as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Table data dictionary processing method and device
CN111209741A
Select selector creation method and device, equipment and medium
CN118363978A