CN116680274A - Method and device for associating business database table and attachment information table - Google Patents

Method and device for associating business database table and attachment information table Download PDF

Info

Publication number
CN116680274A
CN116680274A CN202310729812.9A CN202310729812A CN116680274A CN 116680274 A CN116680274 A CN 116680274A CN 202310729812 A CN202310729812 A CN 202310729812A CN 116680274 A CN116680274 A CN 116680274A
Authority
CN
China
Prior art keywords
information
attachment
service database
primary key
accessory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310729812.9A
Other languages
Chinese (zh)
Inventor
胡镕玙
卫广辉
牛莉颖
赵美凯
张兴贤
王聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310729812.9A priority Critical patent/CN116680274A/en
Publication of CN116680274A publication Critical patent/CN116680274A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

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

Abstract

The application provides a method and a device for associating a service database table and an attachment information table, and relates to the technical field of data information processing. The method comprises the steps of responding to an attachment uploading request message of a user, obtaining an attachment to be uploaded, storing the attachment in a file server, and determining an associated primary key; storing the associated primary key into a business database table; and calling attribute information of the service database table, associating the attribute information with the associated primary key to obtain a first association value, and adding the first association value into the accessory information table. By adopting the technical scheme, the specific position of the accessory in the service database table can be queried through the data information in the accessory information table, so that the loss of the accessory can be avoided during the migration of the accessory, and further the unnecessary loss is reduced.

Description

Method and device for associating business database table and attachment information table
Technical Field
The present application relates to the field of data information processing technologies, and in particular, to a method and an apparatus for associating a service database table with an attachment information table.
Background
At present, the service database table can be associated with the attachment information table through the existing implementation mode, but when the attachment data migration occurs, a developer is required to reversely search the service database table through the attachment information table, and then the attachment attribution is judged, so that the mode is not supported. This is because a typical office system will have tens or even hundreds of business database tables, each business database table will have multiple attachment columns, and multiple attachment columns corresponding to the attachment columns, and it is difficult to continue to check the problem only by associating the identifier as to which attachment column of which business database table the attachment belongs cannot be queried reversely, and the end result is that the attachment is lost.
Therefore, there is a need for a method for associating a service database table with an attachment information table, which can query a specific position of the attachment in the service database table through data information in the attachment information table, so that the attachment is prevented from being lost during the migration of the attachment, and unnecessary loss is reduced.
Disclosure of Invention
The application provides a method and a device for associating a service database table with an attachment information table, which can query the specific position of an attachment in the service database table through data information in the attachment information table, further avoid the loss of the attachment when the attachment is migrated, and further reduce unnecessary loss.
In a first aspect, the present application provides a method for associating a service database table with an attachment information table, the method comprising:
responding to an attachment uploading request message of a user, and acquiring an attachment to be uploaded; wherein the attachment is obtained from the service database table;
storing the attachment to a file server and determining an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the association primary key is used for associating the service database table and the attachment information table; wherein, the accessory information table is used for storing accessory information related to the accessory and the associated primary key; the attachment information is used for searching the attachment in the file server;
Storing the associated primary key into the service database table;
the attribute information of the service database table is called, the attribute information is associated with the association main key to obtain a first association value, and the first association value is added into the attachment information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and primary key value information; wherein the first association value characterizes a set of the attribute information and the associated primary key.
In one example, the retrieving attribute information of the service database table includes:
invoking annotation information of the service database table; wherein the annotation information is section code information;
if the annotation information contains a table name identifier, acquiring the attribute information; and the table name identifier is used for representing that accessories to be uploaded to the file server exist in the service database table.
In one example, the obtaining the attribute information if the table name identifier exists in the annotation information includes:
if the annotation information contains the table name identification, traversing the object class information;
And acquiring the attribute information from the object class information.
In one example, after the storing the attachment in the file server and determining the associated primary key, the method further comprises:
returning the associated main key to a front-end equipment interface, and acquiring service data information associated with the associated main key from the front-end equipment interface;
combining the service data information and the associated primary key to obtain a second associated value, and storing the second associated value into the service database table; wherein the second association value characterizes the set of business data information and the associated primary key.
In one example, before the storing the attachment in the file server and determining the associated primary key, the method further comprises:
and storing the accessory information related to the accessory into the accessory information table.
In one example, the adding the first association value to the attachment information table includes:
searching a data row where the associated main key in the first associated value is located in the accessory information table;
the attribute information in the first association value is added to the data line.
In one example, the attachment information table is stored in a preset database.
In a second aspect, the present application provides an association apparatus for a service database table and an attachment information table, the apparatus comprising:
the first acquisition unit is used for responding to the attachment uploading request message of the user and acquiring the attachment to be uploaded; wherein the attachment is obtained from the service database table;
the determining unit is used for storing the attachment into a file server and determining an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the association primary key is used for associating the service database table and the attachment information table; wherein, the accessory information table is used for storing accessory information related to the accessory and the associated primary key; the attachment information is used for searching the attachment in the file server;
the first storage unit is used for storing the associated primary key into the service database table;
the calling unit is used for calling the attribute information of the service database table, correlating the attribute information with the correlation primary key to obtain a first correlation value, and adding the first correlation value into the accessory information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and primary key value information; wherein the first association value characterizes a set of the attribute information and the associated primary key.
In one example, the call unit includes:
the calling module is used for calling annotation information of the service database table; wherein the annotation information is section code information;
the acquisition module is used for acquiring the attribute information if the table name identification exists in the annotation information; and the table name identifier is used for representing that accessories to be uploaded to the file server exist in the service database table.
In one example, if the table name identifier exists in the annotation information, the obtaining module includes:
a traversing sub-module, configured to traverse object class information if a table name identifier exists in the annotation information;
and the acquisition sub-module is used for acquiring the attribute information from the object class information.
In one example, the apparatus further comprises:
the second acquisition unit is used for returning the associated main key to a front-end equipment interface and acquiring service data information associated with the associated main key from the front-end equipment interface;
the merging unit is used for merging the service data information and the associated primary key to obtain a second associated value, and storing the second associated value into the service database table; wherein the second association value characterizes the set of business data information and the associated primary key.
In one example, the apparatus further comprises:
and the second storage unit is used for storing the accessory information related to the accessory into the accessory information table.
In one example, a fetch unit includes:
the searching module is used for searching the data row where the associated main key in the first associated value is located in the accessory information table;
and the adding module is used for adding the attribute information in the first association value into the data row.
In one example, the attachment information table is stored in a preset database.
In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method according to the first aspect when executed by a processor.
In a fifth aspect, the application provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect.
The application provides a method for associating a service database table and an attachment information table, which comprises the steps of responding to an attachment uploading request message of a user, obtaining an attachment to be uploaded, storing the attachment in a file server, and determining an association main key; storing the associated primary key into the service database table; the attribute information of the service database table is called, the attribute information is associated with the association main key to obtain a first association value, and the first association value is added into the attachment information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and primary key value information; wherein the first association value characterizes a set of the attribute information and the associated primary key. By adopting the technical scheme, the specific position of the accessory in the service database table can be queried through the data information in the accessory information table, so that the loss of the accessory can be avoided during the migration of the accessory, and further the unnecessary loss is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart of a method for associating a service database table with an attachment information table according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of accessory upload of a front-end equipment interface according to a first embodiment of the present application;
fig. 3 is a flow chart of a method for associating a service database table with an attachment information table according to a second embodiment of the present application;
FIG. 4 is a schematic diagram of a section-oriented programming scheme according to a second embodiment of the present application;
fig. 5 is a schematic diagram of acquiring attribute information according to a second embodiment of the present application;
FIG. 6 is a schematic diagram of a code execution framework provided according to a second embodiment of the present application;
fig. 7 is a flowchart of a method for associating and interacting a service database table and an attachment information table according to a third embodiment of the present application;
fig. 8 is a schematic structural diagram of an association device of a service database table and an attachment information table according to a fourth embodiment of the present application;
fig. 9 is a schematic structural diagram of an association device of a service database table and an attachment information table according to a fifth embodiment of the present application;
fig. 10 is a block diagram of an electronic device, according to an example embodiment.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The existing implementation mode can be used for associating the accessory information table with the service database table, but when the accessory related production problem or data migration occurs, a developer is required to reversely search the service database table through the accessory information table to judge the attribution of the accessory, and the mode is not supported. To solve the above problem, it is conceivable to save more associated information in the attachment information table, such as the service database table primary key, service database table name, attachment column name, and to lock the attachment's home service database table after adding this information. But how to save the associated information, the simplest method is that the front end transmits the associated information to the back end, and the back end takes the request parameters to save. But this approach has several problems: on the one hand, the data are not service parameters, the parameter values are the content of a back-end database and are relatively fixed, and the data are not suitable for being transmitted through a front-end request; on the other hand, every code of the front end calling the accessory uploading interface needs to add the parameters, most of the parameters are repeated codes, and
For an office system, accessories belong to a common function, the front end can use unified accessory service, and then the front end is required to transmit relevant parameters for marking accessory attribution when an accessory uploading interface is called, firstly, statistics is required to be carried out on all accessory columns in the system, corresponding code values are required to be transmitted to all request messages for calling the accessory uploading interface by front end development, the system is better than a newly built or reconstructed system, but for the system which is being optimized in an iteration mode, the risk of version iteration is certainly increased, and a large amount of manpower is required to develop.
Therefore, in this embodiment, the characteristic of Spring-based tangent plane-oriented programming (Aspect Oriented Programming, abbreviated as AOP) is introduced, and the proxy service object is encapsulated by means of AspectJ, so that the tangent plane is added in front of the original logic to analyze the attachment attribution information, and the attachment attribution information is automatically stored in the attachment information table, so that the front-end code does not need to be changed, and the back-end supports annotation statement.
Specifically, the tangent plane oriented programming is a technology for realizing maintenance and expansion of program functions through a precompilation mode and dynamic proxy during running.
The application provides a method for associating a service database table and an attachment information table, which aims to solve the technical problems in the prior art.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for associating a service database table with an attachment information table according to a first embodiment of the present application. The first embodiment comprises the following steps:
s101, responding to an attachment uploading request message of a user, and acquiring an attachment to be uploaded; wherein the attachment is obtained from a service database table.
In one example, the attachment upload request message of the user may be triggered after the user clicks an attachment upload button of the front-end device interface, and then the attachment to be uploaded is obtained from a service database table in the front-end device interface, and then is transferred to the back-end device by the front-end device. For a better illustration of the present process, reference may be made to an accessory upload schematic of a head-end equipment interface as shown in FIG. 2. As can be seen from fig. 2, the attachment column is provided with an upload button and a browse button, from which service database table the attachment is obtained can be seen, and from the upload button, the attachment can be transferred from the front-end device to the back-end device.
S102, storing the attachment in a file server, and determining an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the associated main key is used for associating a service database table and an attachment information table; the accessory information table is used for storing accessory information related to accessories and associated primary keys; the attachment information is used to find attachments in the file server.
In this embodiment, the file server is a server for storing an attachment, and the association primary key can associate an attachment information table with a service database table, and specifically, the service database table is also stored in the back-end device, that is, the association primary key can associate the service database table in the back-end device with the attachment information table. The attachment information includes an attachment name, an attachment storage path, a file type, and a file size. After receiving the attachment, the back-end device sends the attachment to the file server, and stores the attachment information related to the attachment in the attachment information table. After receiving the attachment, the file server generates an associated primary key belonging to the attachment according to the attachment, and stores the associated primary key in an attachment information table.
S103, storing the associated primary key into a service database table.
In this embodiment, after the associated primary key is obtained from the file server, the associated primary key is sent to the service database, and this has the advantage that the associated primary key is in both the attachment information table and the service database table.
S104, calling attribute information of the service database table, associating the attribute information with the associated primary key to obtain a first association value, and adding the first association value into the accessory information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and main key value information; wherein the first association value characterizes a set of attribute information and associated primary keys.
In this embodiment, the attribute information is used to describe a specific position of the attachment in the service database table, specifically, table name information of the position of the attachment in the service database table, column name information of the position and primary key value information, and the information is associated with the associated primary key, then a first association value is obtained, and the first association value is stored in the attachment information table, then the attachment information table stores attribute information and associated primary key, and then the position of the attachment in the service database table can be accurately determined according to the attribute information and the associated primary key.
The application provides a method for associating a service database table and an attachment information table, which is characterized in that an attachment to be uploaded is obtained by responding to an attachment uploading request message of a user, the attachment is stored in a file server, and an association main key is determined; storing the associated primary key into a business database table; the attribute information of the business database table is called, the attribute information is associated with the associated primary key to obtain a first association value, and the first association value is added into the accessory information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and main key value information; wherein the first association value characterizes a set of attribute information and associated primary keys. By adopting the technical scheme, the specific position of the accessory in the service database table can be queried through the data information in the accessory information table, so that the loss of the accessory can be avoided during the migration of the accessory, and further the unnecessary loss is reduced.
Fig. 3 is a flowchart of a method for associating a service database table with an attachment information table according to a second embodiment of the present application. The second embodiment includes the following steps:
s301, responding to an attachment uploading request message of a user, and acquiring an attachment to be uploaded; wherein the attachment is obtained from a service database table.
For example, this step may refer to step S101, and will not be described in detail.
S302, storing the attachment in a file server, and determining an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the associated main key is used for associating a service database table and an attachment information table; the accessory information table is used for storing accessory information related to accessories and associated primary keys; the attachment information is used to find attachments in the file server.
For example, this step may refer to step S102, and will not be described in detail.
S303, returning the associated main key to a front-end equipment interface, and acquiring service data information associated with the associated main key from the front-end equipment interface; combining the service data information and the associated primary key to obtain a second associated value, and storing the second associated value into a service database table; wherein the second association value characterizes a set of business data information and associated primary keys.
In this embodiment, after the associated primary key returns to the front-end device interface, service data information related to the associated primary key is obtained from a service database table in the front-end device interface, a second association value is obtained, and then the service database table in the back-end device is called, and the second association value is stored in the service database table.
S304, invoking annotation information of a service database table; the annotation information is section code information.
In this embodiment, the annotation information is labeling information, and further may be section code information. In particular, reference may be made to a schematic diagram of a slice-oriented programming scheme shown in fig. 4. It can be seen from the figure that the effect of slice-oriented programming can be achieved using AspectJ. Specifically, aspectJ is an AOP framework based on java language. Relationship of AspectJ to AOP: AOP is more biased towards concept and definition, and AspectJ is one implementation of AOP for which backend development can use ApsectJ to achieve the effect of AOP. The annotation information is that some important parameters are declared in java class or method in the way of @ annotation, when a developer uses the annotation information, the developer can define attributes in the annotation for receiving required parameter values, in addition, the annotation information can play a role in annotation, and the functions are realized by identifying the class or method for unified processing of the annotation, and the annotation information is generally used for processing of public logic. Post-emphasis is an enhancement type of AOP that executes native code before executing the enhanced logic code.
S305, if the annotation information contains a table name identifier, acquiring attribute information; the table name identification is used for representing that accessories to be uploaded to the file server exist in the service database table.
In this embodiment, the annotation information may use @ WithAttach, which may act on a JAVA method to play a role in labeling, defining an AOP enhanced weave point, defining a tangent point of an AOP tangent plane, and serving to tell the AOP in which method to implant an enhanced code block of the tangent plane, and the developer needs to save the service method label in a service database table related to saving the attachment. The table name is marked as @ AttachmentTable, wherein @ AttachmentTable acts on JAVA class, the back-end device receives parameters transmitted by the front-end device through a common pojo class (inVo), and the inVo class attribute of the preservation service method generally comprises all fields in a service database table. The annotation information comprises an attribute for storing the name information of the service database table stored at this time.
In one example, if the table name identifier exists in the annotation information, acquiring the attribute information includes:
if the annotation information contains the table name identification, traversing the object class information;
attribute information is acquired from the object class information.
In this embodiment, if the table name identifier exists in the annotation information, the object class information is traversed, and specifically, the @ attamentcolumn and @ business pk may be searched. Wherein @ AttachmentColumbn is used for the properties of the JAVA class and the developer is used on the property of the inVo class representing the attachment. The present annotation information contains two attributes, columnName, tableName, respectively. columnName represents column name information of a service database table corresponding to the inVo class attribute. the tableName acts the same as @ AttachmentTable and is used to declare a business database table. This attribute is to solve a scenario that one save service needs to save a plurality of service database tables, and a generally complex service database table may involve the saving of a plurality of service database tables, and a developer may use this attribute to specify an attachment column of a service database table different from that specified in @ localtable, and additionally specify table name information of the service database table to be saved. The @ Business PK acts on the attribute of the JAVA class to play a role in marking, and when the developer uses the INVo class to represent the attribute of the main key of the service database table, the AOP enhancement logic can store the value of the marked attribute as the main key of the service database table into the accessory information table during execution.
S306, associating the attribute information with the association primary key to obtain a first association value, and adding the first association value into the accessory information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and main key value information; wherein the first association value characterizes a set of attribute information and associated primary keys.
In one example, adding the first association value to the attachment information table includes:
searching a data row where an associated main key in the first associated value is located in the accessory information table;
attribute information in the first association value is added to the data line.
For a better illustration, reference may be made to an attribute information acquisition schematic shown in fig. 5. As can be seen from fig. 5, entering the enhanced code phase, the original request parameter object may be obtained, and the request object may be one or more, depending on how the back-end developer defines, typically using a parameter object. By utilizing a JAVA reflection mechanism, the annotation and all the attributes of the class can be obtained through the JAVA object; the obtained class information judges whether the object class is marked with @ Attachment Table annotation, the annotation is configured with the table name information of the service database table, if not, the service database table is represented to be not related to the storage of the attachment, and the response is directly returned; obtaining all attributes of the object class after the @ AttachmentTable annotation is obtained, judging the attribute marked with @ AttachmentColumn or @ BusinessPk according to traversal, configuring columnName in the @ AttachmentColumn annotation by introducing the annotation, wherein the attribute represents a fileId associated main key returned by the back-end device when the accessory is stored; the attribute marked @ businespk represents the primary key value information of the service database table, and after the accessory association information is obtained, the tableName, columnName, businessPk three pieces of information can be added into the data line with the same value of the fileId in the accessory information table.
Specifically, FIG. 6 illustrates a schematic diagram of a framework for code execution, and as can be seen from FIG. 6, the attachment handling logic is written as enhanced code into the save services method to generate a proxy method. In order to avoid the modification of each service database table storage method by the back-end equipment, utilizing the AOP characteristic of Spring, generating a tangent plane code by analyzing and storing logic of attachment related information through an AspectJ frame, taking @ WithAttach as a tangent point, implanting all service methods marked with the annotation into the tangent plane to generate a complete proxy service method for storing the service database table, and combining the original service database table storage logic with the related attachment logic during the code operation period to realize zero invasion of the original code.
The application provides a method for associating a service database table and an attachment information table, which is characterized by calling annotation information of the service database table; the annotation information is section code information, if the annotation information has a table name identifier, attribute information is acquired, the attribute information is associated with an association main key to obtain a first association value, and the first association value is added into an accessory information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and main key value information; wherein the first association value characterizes a set of attribute information and associated primary keys. By adopting the technical scheme, the user-defined annotation is used, the accessory associated information is configured in the annotation, so that the system multi-level service can be supported, the logic enhanced on the tangent plane can be used, the development quantity of codes can be reduced, the code maintenance efficiency can be improved, and the investment of labor cost can be reduced.
Fig. 7 is a flowchart of a method for associating and interacting a service database table and an attachment information table according to a third embodiment of the present application. The third embodiment includes the following steps:
s701, uploading accessories.
S702, storing the accessory information related to the accessory into an accessory information table.
S703, storing the attachment in the file server and determining the associated primary key.
S704, returning the associated primary key to the accessory information table.
S705, returning to the associated primary key.
S706, acquiring service data information associated with the associated primary key from a front-end equipment interface; and combining the service data information and the associated primary key to obtain a second associated value, and storing the second associated value into a service database table.
S707, the attribute information of the service database table is called, the attribute information is associated with the associated primary key, a first association value is obtained, and the first association value is added to the attachment information table.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Fig. 8 is a schematic structural diagram of an association device of a service database table and an attachment information table according to a fourth embodiment of the present application. Specifically, the apparatus 80 of the fourth embodiment includes:
A first obtaining unit 801, configured to obtain an attachment to be uploaded in response to an attachment upload request message of a user; wherein the attachment is obtained from a service database table.
A determining unit 802, configured to store the attachment in the file server, and determine an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the associated main key is used for associating a service database table and an attachment information table; the accessory information table is used for storing accessory information related to accessories and associated primary keys; the attachment information is used to find attachments in the file server.
A first storage unit 803, configured to store the associated primary key in the service database table.
A calling unit 804, configured to call attribute information of the service database table, associate the attribute information with the association primary key, obtain a first association value, and add the first association value to the attachment information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and main key value information; wherein the first association value characterizes a set of attribute information and associated primary keys.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Fig. 9 is a schematic structural diagram of an association device of a service database table and an attachment information table according to a fifth embodiment of the present application. Specifically, the apparatus 90 of the fifth embodiment includes:
a first obtaining unit 901, configured to obtain an attachment to be uploaded in response to an attachment upload request message of a user; wherein the attachment is obtained from a service database table.
A determining unit 902, configured to store the attachment in the file server, and determine an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the associated main key is used for associating a service database table and an attachment information table; the accessory information table is used for storing accessory information related to accessories and associated primary keys; the attachment information is used to find attachments in the file server.
A first storage unit 903, configured to store the associated primary key in a service database table.
A retrieving unit 904, configured to retrieve attribute information of the service database table, associate the attribute information with the association primary key, obtain a first association value, and add the first association value to the attachment information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and main key value information; wherein the first association value characterizes a set of attribute information and associated primary keys.
In one example, the fetch unit 904 includes:
the calling module 9041 is used for calling annotation information of the service database table; the annotation information is section code information.
An obtaining module 9042, configured to obtain attribute information if a table name identifier exists in the annotation information; the table name identification is used for representing that accessories to be uploaded to the file server exist in the service database table.
In one example, if there is a table name identifier in the annotation information, the obtaining module 9042 includes:
the traversing submodule 90421 is used for traversing the object class information if the table name identifier exists in the annotation information.
The acquiring submodule 90422 is used for acquiring attribute information from the object class information.
In one example, the apparatus 90 further comprises:
the second obtaining unit 905 is configured to return the associated primary key to the front-end device interface, and obtain, from the front-end device interface, service data information associated with the associated primary key.
A merging unit 906, configured to merge the service data information and the associated primary key to obtain a second association value, and store the second association value into a service database table; wherein the second association value characterizes a set of business data information and associated primary keys.
In one example, the apparatus 90 further comprises:
a second storage unit 907 for storing accessory information related to the accessory in an accessory information table.
In one example, the fetch unit 904 includes:
the searching module 9043 is configured to search the attachment information table for a data row where the associated primary key in the first association value is located.
The adding module 9044 is configured to add attribute information in the first association value to the data line.
In one example, the attachment information table is stored in a preset database.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
Fig. 10 is a block diagram of an electronic device, which may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like, in accordance with an exemplary embodiment.
The apparatus 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power component 1006, a multimedia component 1008, an audio component 1010, an input/output (I/O) interface 1012, a sensor component 1014, and a communications component 1016.
The processing component 1002 generally controls overall operation of the apparatus 1000, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1002 can include one or more processors 1020 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1002 can include one or more modules that facilitate interaction between the processing component 1002 and other components. For example, the processing component 1002 can include a multimedia module to facilitate interaction between the multimedia component 1008 and the processing component 1002.
The memory 1004 is configured to store various types of data to support operations at the apparatus 1000. Examples of such data include instructions for any application or method operating on the device 1000, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1004 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 1006 provides power to the various components of the device 1000. The power components 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1000.
The multimedia component 1008 includes a screen between the device 1000 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia assembly 1008 includes a front-facing camera and/or a rear-facing camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 1000 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 1010 is configured to output and/or input audio signals. For example, the audio component 1010 includes a Microphone (MIC) configured to receive external audio signals when the device 1000 is in an operational mode, such as a call mode, a recording mode, and a speech recognition mode. The received audio signals may be further stored in memory 1004 or transmitted via communication component 1016. In some embodiments, the audio component 1010 further comprises a speaker for outputting audio signals.
The I/O interface 1012 provides an interface between the processing assembly 1002 and peripheral interface modules, which may be a keyboard, click wheel, buttons, and the like. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 1014 includes one or more sensors for providing status assessment of various aspects of the device 1000. For example, the sensor assembly 1014 may detect an on/off state of the device 1000, a relative positioning of the components, such as a display and keypad of the device 1000, the sensor assembly 1014 may also detect a change in position of the device 1000 or a component of the device 1000, the presence or absence of user contact with the device 1000, an orientation or acceleration/deceleration of the device 1000, and a change in temperature of the device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 can also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1016 is configured to facilitate communication between the apparatus 1000 and other devices, either wired or wireless. The device 1000 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 1016 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1000 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 1004, including instructions executable by processor 1020 of apparatus 1000 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform a method of associating a business database table and an attachment information table of the electronic device.
The application also discloses a computer program product comprising a computer program which, when executed by a processor, implements a method of associating a service database table with an attachment information table as described in this embodiment.
Various implementations of the above-described systems and techniques of the application may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or electronic device.
In the context of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data electronic device), or that includes a middleware component (e.g., an application electronic device), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and an electronic device. The client and the electronic device are generally remote from each other and typically interact through a communication network. The relationship of client and electronic devices arises by virtue of computer programs running on the respective computers and having a client-electronic device relationship to each other. The electronic equipment can be cloud electronic equipment, also called cloud computing electronic equipment or cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service (Virtual Private Server or VPS for short) are overcome. The electronic device may also be an electronic device of a distributed system or an electronic device that incorporates a blockchain. It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution disclosed in the present application can be achieved, and are not limited herein.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (11)

1. A method for associating a service database table with an attachment information table, the method comprising:
responding to an attachment uploading request message of a user, and acquiring an attachment to be uploaded; wherein the attachment is obtained from the service database table;
storing the attachment to a file server and determining an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the association primary key is used for associating the service database table and the attachment information table; wherein, the accessory information table is used for storing accessory information related to the accessory and the associated primary key; the attachment information is used for searching the attachment in the file server;
storing the associated primary key into the service database table;
the attribute information of the service database table is called, the attribute information is associated with the association main key to obtain a first association value, and the first association value is added into the attachment information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and primary key value information; wherein the first association value characterizes a set of the attribute information and the associated primary key.
2. The method of claim 1, wherein the retrieving attribute information of the service database table comprises:
invoking annotation information of the service database table; wherein the annotation information is section code information;
if the annotation information contains a table name identifier, acquiring the attribute information; and the table name identifier is used for representing that accessories to be uploaded to the file server exist in the service database table.
3. The method according to claim 2, wherein the obtaining the attribute information if the table name identifier exists in the annotation information includes:
if the annotation information contains the table name identification, traversing the object class information;
and acquiring the attribute information from the object class information.
4. A method according to claim 3, wherein after said storing the attachment in a file server and determining an associated primary key, the method further comprises:
returning the associated main key to a front-end equipment interface, and acquiring service data information associated with the associated main key from the front-end equipment interface;
combining the service data information and the associated primary key to obtain a second associated value, and storing the second associated value into the service database table; wherein the second association value characterizes the set of business data information and the associated primary key.
5. The method of claim 1, wherein prior to said storing the attachment in a file server and determining an associated primary key, the method further comprises:
and storing the accessory information related to the accessory into the accessory information table.
6. The method of claim 1, wherein the adding the first association value to the attachment information table comprises:
searching a data row where the associated main key in the first associated value is located in the accessory information table;
the attribute information in the first association value is added to the data line.
7. The method according to any one of claims 1-6, wherein the accessory information table is stored in a preset database.
8. An apparatus for associating a service database table with an attachment information table, the apparatus comprising:
the acquisition unit is used for responding to the attachment uploading request message of the user and acquiring the attachment to be uploaded; wherein the attachment is obtained from the service database table;
the determining unit is used for storing the attachment into a file server and determining an associated primary key; wherein the associated primary key is generated by the file server according to the attachment; the association primary key is used for associating the service database table and the attachment information table; wherein, the accessory information table is used for storing accessory information related to the accessory and the associated primary key; the attachment information is used for searching the attachment in the file server;
The storage unit is used for storing the associated primary key into the service database table;
the calling unit is used for calling the attribute information of the service database table, correlating the attribute information with the correlation primary key to obtain a first correlation value, and adding the first correlation value into the accessory information table; the attribute information represents table name information of the position of the accessory in the service database table, column name information of the position and primary key value information; wherein the first association value characterizes a set of the attribute information and the associated primary key.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1-7.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
CN202310729812.9A 2023-06-19 2023-06-19 Method and device for associating business database table and attachment information table Pending CN116680274A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310729812.9A CN116680274A (en) 2023-06-19 2023-06-19 Method and device for associating business database table and attachment information table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310729812.9A CN116680274A (en) 2023-06-19 2023-06-19 Method and device for associating business database table and attachment information table

Publications (1)

Publication Number Publication Date
CN116680274A true CN116680274A (en) 2023-09-01

Family

ID=87785369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310729812.9A Pending CN116680274A (en) 2023-06-19 2023-06-19 Method and device for associating business database table and attachment information table

Country Status (1)

Country Link
CN (1) CN116680274A (en)

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
US10909203B2 (en) Method and device for improving page display effect via execution, conversion and native layers
CN105930536B (en) Index establishing method, page jumping method and device
US11210449B2 (en) Page display method and device and storage medium
CN104951522B (en) Method and device for searching
CN105468606B (en) Webpage saving method and device
CN112988822B (en) Data query method, device, equipment, readable storage medium and product
CN112862349B (en) Data processing method, device and equipment based on ABS service data
CN111061633B (en) Webpage first screen time detection method, device, terminal and medium
CN112333233B (en) Event information reporting method and device, electronic equipment and storage medium
CN116680274A (en) Method and device for associating business database table and attachment information table
CN112860625A (en) Data acquisition method, data storage method, device, equipment and storage medium
CN111191998A (en) Item processing method and device
CN112182027B (en) Information query method, device, electronic equipment and storage medium
CN112800285B (en) Data query method, device, storage medium and product based on graph database
CN111538486B (en) Layout file nesting layer number screening method and device and electronic equipment
CN111159148B (en) Configuration information state management method and device, electronic equipment and storage medium
CN115905387A (en) Data code information generation method, device, equipment and storage medium
CN117472931A (en) Method, device, equipment and storage medium for calling database execution statement
CN114756319A (en) Applet page display method, device and equipment and storage medium
CN118193603A (en) Label management method, device, terminal and storage medium
CN116755694A (en) Page information display method, device, equipment and storage medium
CN114329088A (en) Directory structure file generation method, device, equipment and storage medium
CN116562999A (en) Financial product asset class determination method, equipment and storage medium
CN115952311A (en) Text information generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination