Order system database connection method, device and equipment and computer readable medium

By using a unified login system to determine and connect order system databases based on user identity, the method addresses high resource and maintenance challenges, enhancing efficiency and reducing development effort.

CN120316167AActive Publication Date: 2025-07-15GONGYI (BEIJING) CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510381869.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-15
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

When connecting to the order system database, the existing technology requires a lot of service resources and developer workload, especially when cloud platform deployment and system upgrade, resulting in waste of resources and increased workload.

Method used

By determining the identity of the subject to which the user belongs in response to the user login information, using the preset database configuration information generation model to obtain the database identity, and connecting the database in a unified application, dynamically creating database objects to achieve unified login portal and data operations.

Benefits of technology

Save service resources, simplify system maintenance and upgrade processes, and reduce developer workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120316167A_ABST
    Figure CN120316167A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an order system database connection method and device, equipment and a computer readable medium. A specific embodiment of the method comprises the following steps: in response to detection of order system login information of a corresponding order system, determining a subject identifier to which a login user identifier included in the corresponding order system login information belongs; inputting the subject identifier to which the user belongs into a preset database configuration information generation model to obtain database configuration information; connecting an order system database according to the database configuration information; determining whether the order system database is successfully connected; in response to determining that the order system database is successfully connected and receiving operation request information corresponding to the order system sent by the target user terminal, generating request data information according to the operation request information and the order system database; and sending the request data information to the corresponding target user terminal. According to the embodiment, service resources can be saved, system maintenance and upgrading are facilitated, and the workload of developers is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to a method, apparatus, device, and computer-readable medium for connecting an order system database. Background Art

[0002] An order system database can store a large amount of order data, providing strong data support for the operation of an enterprise. Currently, when connecting to an order system database, the commonly adopted method is that separate application programs are deployed for the order systems of different enterprises to connect to the corresponding order system databases, facilitating users to log in and access the independent order system databases using independent URLs.

[0003] However, the inventors have found that when connecting to an order system database in the above manner, the following technical problems often exist: separate application programs are deployed for the order systems of different enterprises to connect to the corresponding order system databases. When deployed on a cloud platform, a large amount of service resources are required, and when the order system needs to be upgraded, a large number of application programs need to be updated simultaneously, resulting in a large workload for developers.

[0004] The above information disclosed in this background art section is only used to enhance the understanding of the background of the concept of the present disclosure, and thus, it may include information that does not form the prior art known to those of ordinary skill in the art in this country. Summary of the Invention

[0005] The content part of the present disclosure is used to briefly introduce concepts that will be described in detail in the subsequent detailed implementation part. The content part of the present disclosure is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0006] Some embodiments of the present disclosure propose a method, apparatus, electronic device, and computer-readable medium for connecting an order system database to solve the technical problems mentioned in the above background art section.

[0007] In a first aspect, some embodiments of the present disclosure provide a method for connecting to an order system database. The method includes: in response to detecting order system login information corresponding to an order system sent by a target user terminal, determining a subject identifier to which a login user identifier included in the order system login information belongs, where the target user terminal is the terminal of the logged-in user, and the order system corresponds to at least one user subject identifier and each database identifier; inputting the user subject identifier into a preset database configuration information generation model to obtain database configuration information, where the database configuration information includes a database identifier; connecting to an order system database corresponding to the database identifier according to the database configuration information; determining whether the connection to the order system database is successful; in response to determining that the connection to the order system database is successful and receiving operation request information corresponding to the order system sent by the target user terminal, generating request data information according to the operation request information and the order system database; and sending the request data information to the corresponding target user terminal for display.

[0008] In a second aspect, some embodiments of the present disclosure provide an order system database connection device. The device includes: a first determination unit configured to, in response to detecting order system login information corresponding to an order system sent by a target user terminal, determine a subject identifier to which a login user identifier included in the order system login information belongs, where the target user terminal is the terminal of the logged-in user, and the order system corresponds to at least one user subject identifier and each database identifier; an input unit configured to input the user subject identifier into a preset database configuration information generation model to obtain database configuration information, where the database configuration information includes a database identifier; a connection unit configured to connect to an order system database corresponding to the database identifier according to the database configuration information; a second determination unit configured to determine whether the connection to the order system database is successful; a generation unit configured to, in response to determining that the connection to the order system database is successful and receiving operation request information corresponding to the order system sent by the target user terminal, generate request data information according to the operation request information and the order system database; and a sending unit configured to send the request data information to the corresponding target user terminal for display.

[0009] In a third aspect, some embodiments of the present disclosure provide an electronic device, including: one or more processors; a storage device having stored thereon one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method described in any implementation manner of the first aspect above.

[0010] Fourthly, some embodiments of the present disclosure provide a computer-readable medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.

[0011] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the order system database connection method of some embodiments of the present disclosure, service resources can be saved, system maintenance and upgrade are facilitated, and the workload of developers is reduced. Specifically, the reasons for the need for more service resources and a large workload of developers are as follows: Different order systems deploy separate application programs to connect to the corresponding order system databases. When deployed on a cloud platform, more service resources are required, and when the order system needs to be upgraded, a large number of application programs need to be updated simultaneously, resulting in a large workload for developers. Based on this, in the order system database connection method of some embodiments of the present disclosure, first, in response to detecting the order system login information of the target user terminal corresponding to the order system, determine the subject identifier to which the login user identifier included in the order system login information belongs. Among them, the above-mentioned target user terminal is the terminal of the above-mentioned login user, and the above-mentioned order system corresponds to at least one user subject identifier and each database identifier. Thus, developers can deploy the databases corresponding to the order systems of different user subjects on the same application program, so that all order system users can log in through a unified system login entry. Then, when the subject to which the logged-in user belongs is obtained, it can be used to determine the order system database to be connected. Secondly, input the above-mentioned user subject identifier into a preset database configuration information generation model to obtain database configuration information. Among them, the above-mentioned database configuration information includes a database identifier. Thus, the identifier of the order system database of the subject to which the logged-in user belongs can be determined through a pre-set model representing the user subject identifier and the database configuration information, facilitating subsequent connection to the corresponding database. Then, according to the above-mentioned database configuration information, connect to the order system database corresponding to the above-mentioned database identifier. Thus, the order system database that the logged-in user needs to log in to can be connected. After that, determine whether the above-mentioned order system database is successfully connected; in response to determining that the order system database is successfully connected and receiving the operation request information of the above-mentioned order system sent by the above-mentioned target user terminal, generate request data information according to the above-mentioned operation request information and the above-mentioned order system database. Thus, when the logged-in user performs data operations on the order system, the connected order system database can be operated to obtain corresponding data. Finally, send the above-mentioned request data information to the above-mentioned target user terminal for display. Thus, the logged-in user can implement system operations.Also, when connecting to the order system database, a model representing the user's affiliated entity identifier and database configuration information can be preset first. Then, developers deploy a unified login entry for the order system and configure the database configuration information for each database. When a user logs in to the order system, database objects can be dynamically created through the preset model and the information of the logged-in user, enabling the user to operate the order system database to which the user belongs through the unified login entry of the order system. Furthermore, there is no need to deploy separate application programs for the order systems of different affiliated entities. Thus, service resources can be saved, system maintenance and upgrade are facilitated, and the workload of developers is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that the elements and elements are not necessarily drawn to scale.

[0013] Figure 1 is a flowchart of some embodiments of the method for connecting an order system database according to the present disclosure;

[0014] Figure 2 is a schematic structural diagram of some embodiments of the device for connecting an order system database according to the present disclosure;

[0015] Figure 3 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0017] In addition, it should be noted that for ease of description, only parts related to the relevant invention are shown in the drawings. Without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.

[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules, or units, and are not used to limit the order of functions performed by these devices, modules, or units or their interdependent relationships.

[0019] It should be noted that the modifiers "one" and "multiple" mentioned in this disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless clearly specified otherwise in the context, it should be understood as "one or more".

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of this disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] Figure 1 Flow 100 of some embodiments of the order system database connection method according to this disclosure is shown. The order system database connection method includes the following steps:

[0022] Step 101, in response to detecting the order system login information corresponding to the order system sent by the target user terminal, determine the subject identifier to which the login user identifier included in the order system login information belongs.

[0023] In some embodiments, the execution entity (such as a server) of the order system database connection method can, in response to detecting the order system login information corresponding to the order system sent by the target user terminal, determine the subject identifier to which the login user identifier included in the above-mentioned order system login information belongs. Among them, the above-mentioned login user identifier can be the identifier of the login user. The above-mentioned login user can be the user who logs in to the order system. The above-mentioned target user terminal is the terminal of the login user. The above-mentioned order system login information can represent that the login user logs in to the order system. For example, the above-mentioned order system login information can be "log in". The above-mentioned subject identifier can be the unique identifier of the subject to which the login user belongs (such as a company). The above-mentioned order system can correspond to at least one user subject identifier and each database identifier. The user subject identifier can be the identifier of the subject to which the user belongs. The database identifier can be the identifier of the order system database corresponding thereto. The above-mentioned order system database can be the database corresponding to the order system. In practice, the above-mentioned execution entity can determine the subject identifier to which the login user identifier included in the above-mentioned order system login information belongs through various means.

[0024] In some optional implementation manners of some embodiments, the above-mentioned execution entity can determine the subject identifier to which the login user identifier included in the above-mentioned order system login information belongs through the following steps:

[0025] First step, input the login user identifier included in the above-mentioned order system login information into a preset comparison subject identifier generation model to obtain at least one comparison subject identifier. Among them, the above-mentioned comparison subject identifier generation model can be a relationship comparison table with the login user identifier and the comparison subject identifier as column headers. The above-mentioned comparison subject identifier generation model can be pre-statistically obtained by the development user.

[0026] In the second step, determine the quantity of each subject identifier to which the above at least one comparison subject identifier belongs as the quantity of the comparison subject identifier.

[0027] In the third step, in response to determining that the quantity of the above comparison subject identifiers meets the preset quantity condition, send the above respective comparison subject identifiers to the above target user terminal for the logged-in user to select. Wherein, the above preset quantity condition may be that the quantity of the comparison subject identifiers is greater than 1. It should be noted that after the target user terminal receives each comparison subject identifier, it may display the received comparison subject identifiers on an associated display device. Then, when the user selects any comparison subject identifier included in the above respective comparison subject identifiers, determine the selected comparison subject identifier as the confirmed subject identifier.

[0028] In the fourth step, in response to detecting the confirmed subject identifier sent by the above target user terminal, determine the above confirmed subject identifier as the subject identifier corresponding to the logged-in user identifier included in the above order system login information. Wherein, the above confirmed subject identifier may be the comparison subject identifier selected by the logged-in user on the target user terminal.

[0029] Optionally, the above execution entity may also, in response to determining that the quantity of the above comparison subject identifiers is 1, determine the obtained comparison subject identifier as the subject identifier corresponding to the logged-in user identifier included in the above order system login information.

[0030] Optionally, the above database configuration information generation model is pre-generated through the following steps:

[0031] In the first step, in response to detecting a user subject creation request message, determine whether the above user subject creation request message contains user subject database information. Wherein, the above user subject creation request message may further include a user subject identifier. The above user subject creation request message may represent a request to add a user subject in the order system. The user subject database information may represent the database configuration information of the order system database that the user subject has already created itself.

[0032] In the second step, in response to determining that the above user subject creation request message contains user subject database information, determine comparison database configuration information according to the above user subject database information. In practice, the above execution entity may, in response to determining that the above user subject creation request message contains user subject database information, determine the above user subject database information as the comparison database configuration information.

[0033] Optionally, the above-mentioned execution entity may also perform the following steps:

[0034] Step 1: In response to determining that the user-owned entity creation request information does not include user-owned entity database information, send the preset database creation request information to the database creation terminal. The preset database creation request information may be information preset to represent a request to create a new order system database. The database creation terminal may be the terminal of the user who creates the order system database.

[0035] Step 2: In response to receiving the database creation completion information corresponding to the preset database creation request information sent by the database creation terminal, determine the control database configuration information according to the database creation information included in the database creation completion information. The database creation completion information may represent that the order system database creation is completed. The database creation information may be the database configuration information of the created order system database. In practice, the execution entity may, in response to receiving the database creation completion information corresponding to the preset database creation request information sent by the database creation terminal, determine the database creation information included in the database creation completion information as the control database configuration information.

[0036] Step 3: Generate a database configuration information generation model according to the user-owned entity identifier and the control database configuration information. In practice, the execution entity fills the user-owned entity identifier and the control database configuration information into a preset database configuration information comparison table template to obtain a database configuration information generation model. The preset database configuration information comparison table template may be preset, and is a data table with the user-owned entity identifier and the control database configuration information as the list headers.

[0037] Step 102: Input the user-owned entity identifier into the preset database configuration information generation model to obtain the database configuration information.

[0038] In some embodiments, the execution entity may input the user-owned entity identifier into the preset database configuration information generation model to obtain the database configuration information. The database configuration information may represent the configuration of the database. The database configuration information may include, but is not limited to, a database identifier. The database configuration information generation model may represent the corresponding relationship between the user-owned entity identifier and the database configuration information. The database configuration information may be the information of the corresponding order system database. The database configuration information may further include a database password and a database address. The database password may be the password required for an application program to connect to the database in the corresponding order system.

[0039] Step 103: Connect to the order system database corresponding to the database identifier according to the database configuration information.

[0040] In some embodiments, the above-mentioned execution entity may connect to the order system database corresponding to the above-mentioned database identifier according to the above-mentioned database configuration information. In practice, the above-mentioned execution entity may input the above-mentioned database configuration information into a preset database connection function to connect to the order system database corresponding to the above-mentioned database identifier. The above-mentioned preset database connection function may be a function preset for connecting to a database. For example, the above-mentioned preset database connection function may be the "connect()" function.

[0041] Step 104: Determine whether the connection to the order system database is successful.

[0042] In some embodiments, the above-mentioned execution entity may determine whether the connection to the order system database is successful. In practice, the above-mentioned execution entity may determine whether the connection to the order system database is successful in various ways.

[0043] In some alternative implementation manners of some embodiments, the above-mentioned execution entity may determine whether the connection to the order system database is successful through the following steps:

[0044] First step: Obtain the historical connection duration set corresponding to the above-mentioned order system database. Among them, the historical connection duration in the above-mentioned historical connection duration set may be the duration spent connecting to the above-mentioned order system database at a historical time point. In practice, the above-mentioned execution entity may obtain the historical connection duration set corresponding to the above-mentioned order system database from the monitoring log file database. The above-mentioned monitoring log file database may be a database for storing monitoring logs.

[0045] Second step: Determine the average value of each historical connection duration included in the above-mentioned historical connection duration set as the historical average connection duration.

[0046] Third step: In response to determining that the current time does not meet the preset connection duration condition, obtain the historical connection information sequence corresponding to the above-mentioned order system database. Among them, the above-mentioned preset connection duration condition may be: the connected duration is greater than the above-mentioned historical average connection duration, and the above-mentioned connected duration may be the interval duration between the current time and the time when connecting to the above-mentioned order system database. The above-mentioned historical connection information sequence may be a sequence in which each historical connection information is arranged in ascending order of time. The historical connection information in the above-mentioned historical connection information sequence may include, but is not limited to, the connection time and the connection status. The above-mentioned connection time may be the time when starting to connect to the above-mentioned order system database. The above-mentioned connection status may indicate whether the connection to the order system database is successful. The above-mentioned connection status may be, but is not limited to, one of the following: connection successful, connection failed.

[0047] Step 4: Input the above historical connection information sequence into a pre-trained prediction connection status generation model to obtain a predicted connection status. The prediction connection status generation model can be a time series prediction model that takes the historical connection information sequence as input and outputs the predicted connection status. The above time series prediction model can be a model used to analyze data points arranged in chronological order and predict future trends based on historical data. For example, the above time series prediction model can be a long short-term memory network. The above predicted connection status can be the connection status at a predicted future time point. The above predicted connection status can be, but is not limited to, one of the following: connection successful, connection failed.

[0048] Step 5: In response to determining that the above predicted connection status meets the preset connection status condition and detecting the preset database connection success information, determine that the order system database is successfully connected. The above preset connection status condition can be that the above predicted connection status is connection successful. The above preset database connection success information can be information preset to represent the successful connection of the order system database. It should be noted that the preset database connection success information is triggered when the order system database is successfully connected.

[0049] Step 6: In response to determining that the above predicted connection status does not meet the above preset connection status condition and the current time meets the preset connection failure duration condition, determine that the order system database is not successfully connected and obtain the current database performance information. The above preset connection failure duration condition can be that the time interval between the current time and the time point when connecting to the order system database starts is greater than the preset connection failure duration. The above preset connection failure duration can be the duration preset to represent connection failure. For example, the above preset connection failure duration can be 10 seconds. The above current database performance information can represent the performance of the order system database at the current time. The above current database performance information can include, but is not limited to, the database network status, the number of database connections, and the database memory usage rate. The above database network status can be the network status of the order system database. The above number of database connections can be the number of terminals connected to the order system database. The above database memory usage rate can be the memory usage rate of the order system database.

[0050] Step 7: Determine the connection failure type based on the above current database performance information. Among them, the above connection failure type can characterize the type of failure of the order system database connection failure. The above connection failure type can be, but is not limited to, one of the following: network interruption, insufficient memory. As an example, in response to determining that the database network status included in the above current database performance information is network disconnection, the preset network interruption type is determined as the connection failure type. Among them, the above preset network interruption type can be a type preset to characterize network interruption. As another example, in response to determining that the database memory usage rate included in the above current database performance information is greater than the preset usage rate maximum value, the preset insufficient memory type is determined as the connection failure type. Among them, the above preset usage rate maximum value can be the maximum value of the usage rate of normal memory usage preset in advance.

[0051] Step 8: Send the above connection failure type to the development terminal for the development user to detect. Among them, the above development terminal can be the terminal of the development user. The above development user can be the user who develops the order system.

[0052] Step 105: In response to determining that the order system database connection is successful and receiving the operation request information corresponding to the order system sent by the target user terminal, generate request data information according to the operation request information and the order system database.

[0053] In some embodiments, the above execution subject can, in response to determining that the order system database connection is successful and receiving the operation request information corresponding to the order system sent by the above target user terminal, generate request data information according to the above operation request information and the above order system database. Among them, the above operation request information can characterize the request of the user to operate the corresponding order system. The above request data information can be the data that the logged-in user needs to obtain by operating the order system. In practice, the above execution subject can generate request data information according to the above operation request information and the above order system database in various ways.

[0054] In the process of adopting technical solutions to solve the technical problems in the background technology, there is often another technical problem 2: Affected by the value activities (such as promotional activities) of the subject (company) to which the order system belongs, there will be a phenomenon that the request volume increases concentratedly during a certain period of time, resulting in insufficient load resources. In response to the above technical problem 2, the conventional solution is generally: preset the maximum value of the load resources of the order system database. However, the above conventional solution still has the following problems: when the order volume is small, the set load resources are too large, resulting in waste of load resources, and when the order volume is small, the set load resources are too small, resulting in insufficient load resources, thus causing poor database stability.

[0055] In view of the problems of the above-mentioned conventional solutions, in the face of the above-mentioned second technical problem, the following solutions can be adopted:

[0056] In some alternative implementation manners of some embodiments, before generating the request data information based on the above-mentioned operation request information and the above-mentioned order system database, the above-mentioned execution entity may perform the following steps:

[0057] First step, obtain the historical order information sequence corresponding to the subject identifier and the current value activity information. Among them, the above-mentioned historical order information sequence may be a sequence in which each historical order information is arranged in ascending order of time. The historical order information in the above-mentioned historical order information sequence may include, but is not limited to, historical order volume, historical time, and historical value activity information. The above-mentioned historical order volume may be the order volume corresponding to the historical time. The above-mentioned historical value activity information may be information characterizing the value activities (such as promotional activities) adopted by the subject to which the subject identifier belongs at the historical time. The above-mentioned historical value activity information may include, but is not limited to, historical value activity types. The above-mentioned historical value activity type may be the type of value activity adopted by the subject to which the subject identifier belongs at the historical time. The above-mentioned historical value activity type may be, but is not limited to, one of the following: weekly value activity (such as weekly promotion), year-end value activity, no value activity. The above-mentioned current value activity information may be information characterizing the value activities (such as promotional activities) adopted by the subject to which the subject identifier belongs at the current time. The above-mentioned current value activity information may include, but is not limited to, current value activity types. The above-mentioned current value activity type may be the type of value activity adopted by the subject to which the subject identifier belongs at the current time. The above-mentioned current value activity type may be, but is not limited to, one of the following: weekly value activity (such as weekly promotion), year-end value activity, no value activity.

[0058] Second step, perform feature extraction processing on each historical order volume, each historical time point, each historical value activity information included in the above-mentioned historical order information sequence, and the above-mentioned current value activity information to obtain order volume feature information, time point feature information, historical value activity feature information, and current value activity feature information. In practice, the above-mentioned execution entity may input each historical order volume, each historical time point, each historical value activity information included in the above-mentioned historical order information sequence, and the above-mentioned current value activity information into a pre-trained feature extraction model to obtain order volume feature information, time point feature information, historical value activity feature information, and current value activity feature information. Among them, the above-mentioned feature extraction model may be a convolutional neural network with a filter size of 32, an activation function of tanh, and a convolutional kernel size of 1.

[0059] Step 3: Based on the above order volume feature information, the above time point feature information, the above historical value activity feature information, the above current value activity feature information, and the preset feature weight set, obtain the target order volume feature information, the target time point feature information, the target historical value activity feature information, and the target current value activity feature information. Among them, the preset feature weights included in the above preset feature weight set can be feature weights obtained through pre-training. The preset feature weights included in the above preset feature weight set respectively correspond to the above order volume feature information, the above time point feature information, the above historical value activity feature information, and the above current value activity feature information. In practice, for the feature information of each feature type, the execution entity can determine the target feature information corresponding to the above feature type as the product of the feature information corresponding to the above feature type and the corresponding preset feature weight. The feature type can be order volume feature, time point feature, historical value activity feature, and current value activity feature. It should be noted that when the feature type is the order volume feature, the corresponding feature information is the order volume feature information, and the target feature information is the target order volume feature information. When the feature type is the time point feature, the corresponding feature information is the time point feature information, and the target feature information is the target time point feature information. When the feature type is the historical value activity feature, the corresponding feature information is the historical value activity feature information, and the target feature information is the target historical value activity feature information. When the feature type is the current value activity feature, the corresponding feature information is the current value activity feature information, and the target feature information is the target historical value activity feature information.

[0060] Step 4: Input the above target order volume feature information, the above target time point feature information, the above target historical value activity feature information, and the above target current value activity feature information into the pre-trained predicted order volume generation model to obtain the predicted order volume. Among them, the above predicted order volume generation model can be a time series prediction model that takes the above target order volume feature information, the above target time point feature information, the above target historical value activity feature information, and the above target current value activity feature information as inputs and the predicted order volume as the output. The above predicted order volume can be the order volume at a future time point obtained through prediction. For example, the above time series prediction model can be a bidirectional long short-term memory network. The number of nodes in the two hidden layers of the above bidirectional long short-term memory network can both be 64. Dropout can be set to 0.2. The batch size can be set to 128, and the number of epochs can be set to 100. The time window size can be 5. The sliding step size can be 1.

[0061] Step 5: Determine the preset write operation request volume corresponding to the above predicted order volume as the write operation request volume of the order system. Among them, the above preset write operation request volume can be the request volume of the write operation required when reaching the preset order volume range, which is preset. The above preset order volume can be the preset range of the order volume. The preset write operation request volume corresponding to the above predicted order volume can be: the preset write operation request volume corresponding to the preset order volume range where the above predicted order volume is located.

[0062] Step 6: In response to determining that the above current value activity information meets the preset activity conditions, determine the average value of each historical order volume corresponding to the above current value activity information among each historical order volume as the historical average order volume. Among them, the above preset activity conditions can be that the current value activity type included in the current value activity information is not a valueless activity. The historical order volume corresponding to the above current value activity information can be: the historical order volume with the same historical value activity information as the current value activity information, that is, the historical order volume during the current value activity period.

[0063] Step 7: Determine the preset read operation request volume corresponding to the above current value activity information and the above historical average order volume as the read operation request volume of the order system. Among them, the above preset read operation request volume can be the request volume of the read operation preset when in the current value activity type and there is a historical average order volume. The above preset read operation request volume can be statistically obtained based on the historical actual average order volume and the value activity type.

[0064] Step 8: Determine the sum of the preset write load resources corresponding to the above write operation request volume of the order system and the preset read load resources corresponding to the above read operation request volume of the order system as the predicted load resources. The above preset write load resources can be the load resources of the write operation required when the write operation request volume is the write operation request volume of the order system, which is preset. The above preset read load resources can be the load resources of the read operation required when the read operation request volume is the read operation request volume of the order system, which is preset.

[0065] Step 9: Allocate the load resources corresponding to the above predicted load resources to the order system database.

[0066] The above technical solution and its related content, as an inventive point of the embodiments of the present disclosure, solve the technical problem of "waste or insufficiency of load resources and poor database stability". The factors that lead to waste or insufficiency of load resources and poor database stability are often as follows: judged by monitoring the temperature of the combustion chamber. However, the above conventional solution still has the following problems: when the order volume is small, the set load resources are too large, resulting in waste of load resources; when the order volume is small, the set load resources are too small, resulting in insufficiency of load resources, thus causing poor database stability. If the above factors are solved, the effect of reducing waste of load resources and improving database stability can be achieved. To achieve this effect, the database connection method of the order system of the present disclosure predicts the order volume at a future time point in advance, thereby predicting the number of requests, and then predicts the required load resources in advance, so as to dynamically allocate the load resources required at future moments in advance. Also, because when predicting the order volume, an attention mechanism is added to each feature information, thereby improving the accuracy of the predicted order volume, and then improving the fit between the predicted load resources and the actually required load resources. Moreover, because when predicting the load resources, the load resources for read operations and write operations are predicted respectively according to the order volume, thus, the accuracy of the allocated load resources can be improved, waste of load resources can be reduced, and database stability can be improved.

[0067] In some optional implementation manners of some embodiments, the above execution subject can generate request data information according to the above operation request information and the order system database in response to receiving the operation request information corresponding to the above order system sent by the above target user terminal through the following steps:

[0068] First step, in response to receiving the operation request information corresponding to the above order system sent by the above target user terminal, determine whether there is a lock identifier for the operation data included in the above operation request information. Wherein, the above operation data may be the data operated by the logged-in user on the order system. The lock identifier may be the identifier of an asynchronous lock implemented by redis.

[0069] Second step, in response to determining that there is no such lock identifier for the above operation data, generate request data information according to the above operation request information and the order system database.

[0070] Optionally, the above execution subject may send preset operation restricted information to the above target user terminal in response to determining that there is such lock identifier for the above operation data. Wherein, the above preset operation restricted information may be the information preset to indicate that the logged-in user cannot operate. For example, the above preset operation restricted information may be "temporarily unable to operate".

[0071] Optionally, the above operation request information may include, but is not limited to, the operation type. The above operation type may characterize the functional type of the logged-in user's operation on the order system. The above operation type may be, but is not limited to, data table paging and data table merging.

[0072] In some optional implementation manners of some embodiments, the above execution subject may generate request data information according to the above operation request information and the above order system database through the following steps:

[0073] First step, determine the preset abstract class function corresponding to the operation type included in the above operation request information as the abstract class function. Wherein, the above preset abstract class function may be a function predefined by a developer for accessing the order system database.

[0074] Second step, create a database object corresponding to the above order system database according to the preset unified data service function. Wherein, the above abstract class function may inherit the above preset unified data service function. The above preset unified data service function may be a function preset by a development user for uniformly defining the general functions of each order system database.

[0075] Third step, call the above abstract class function according to the above database object to generate request data information.

[0076] As an example, use an abstract class to uniformly define the DataServer function. When the operation type is data table paging and the order system database is an oracle database, the abstract class function of the second inheritance class of DataServer may be rownum. When the order system database is a mysql database, the abstract class function of the second inheritance class of DataServer may be limit. Thus, for different order system databases, when it is necessary to operate on the database, a specified DataServer object can be created according to the database type. When a new order system database is added, only the function of the corresponding order system database needs to be added to the second inheritance class, which is convenient for the maintenance and debugging of the application program.

[0077] Step 106, send the request data information to the corresponding target user terminal for display.

[0078] In some embodiments, the above execution subject may send the above request data information to the corresponding target user terminal for display.

[0079] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the order system database connection method of some embodiments of the present disclosure, service resources can be saved, system maintenance and upgrading can be facilitated, and the workload of developers can be reduced. Specifically, the reason for the need for more service resources and the large workload of developers is that different order systems deploy separate applications to connect to the corresponding order system database. When deployed on a cloud platform, more service resources are required, and when the order system needs to be upgraded, more applications need to be updated at the same time, resulting in a large workload for developers. Based on this, the order system database connection method of some embodiments of the present disclosure, first, in response to detecting the order system login information of the corresponding order system sent by the target user terminal, determines the subject identifier of the login user identifier included in the above order system login information. Among them, the above-mentioned target user terminal is the terminal of the above-mentioned login user, and the above-mentioned order system corresponds to at least one user subject identifier and each database identifier. As a result, developers can deploy each database corresponding to the order system of the subject of different users on the same application, so that all order system users can log in through a unified system login entrance, and then, when the subject to which the login user belongs is obtained, it can be used to determine the order system database that needs to be connected. Secondly, the subject identifier of the above-mentioned user is input into the preset database configuration information generation model to obtain the database configuration information. Among them, the above-mentioned database configuration information includes the database identifier. Therefore, the identifier of the order system database of the subject to which the logged-in user belongs can be determined by the pre-set model that characterizes the subject identifier and the database configuration information, so as to facilitate the subsequent connection to the corresponding database. Then, according to the above-mentioned database configuration information, the order system database corresponding to the above-mentioned database identifier is connected. In this way, the order system database that the logged-in user needs to log in can be connected. Afterwards, in response to receiving the operation request information corresponding to the above-mentioned order system sent by the above-mentioned target user terminal, the request data information is generated according to the above-mentioned operation request information and the above-mentioned order system database. Therefore, when the logged-in user performs data operations on the order system, the connected order system database can be operated to obtain the corresponding data. Finally, the above-mentioned request data information is sent to the corresponding target user terminal for display. In this way, the logged-in user can implement system operations.Also, when connecting to the order system database, a model representing the user's affiliated entity identifier and database configuration information can be set in advance. Then, developers deploy a unified login entry for the order system and configure the database configuration information for each database. When a user logs in to the order system, a database object can be dynamically created based on the pre-set model and the information of the logged-in user, enabling the user to operate the order system database to which the user belongs through the unified order system login entry. Furthermore, there is no need to deploy separate application programs for the order systems of different affiliated entities. Therefore, service resources can be saved, system maintenance and upgrade are facilitated, and the workload of developers is reduced.

[0080] Further referring to Figure 2 , as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an order system database connection device. These device embodiments correspond to Figure 2 the method embodiments shown, and the device can be specifically applied to various electronic devices.

[0081] As shown in Figure 2 , some embodiments of the order system database connection device 200 include: a first determination unit 201, an input unit 202, a connection unit 203, a second determination unit 204, a generation unit 205, and a sending unit 206. Among them, the first determination unit 201 is configured to determine the affiliated entity identifier corresponding to the login user identifier included in the order system login information in response to detecting the order system login information of the target user terminal corresponding to the order system. Here, the target user terminal is the terminal of the logged-in user, and the order system corresponds to at least one user affiliated entity identifier and each database identifier. The input unit 202 is configured to input the user affiliated entity identifier into a pre-set database configuration information generation model to obtain database configuration information, where the database configuration information includes a database identifier. The connection unit 203 is configured to connect to the order system database corresponding to the database identifier according to the database configuration information. The second determination unit 204 is configured to determine whether the connection to the order system database is successful. The generation unit 205 is configured to generate request data information according to the operation request information and the order system database in response to determining that the connection to the order system database is successful and receiving the operation request information of the target user terminal corresponding to the order system. The sending unit 206 is configured to send the request data information to the corresponding target user terminal for display.

[0082] It can be understood that the units described in the order system database connection device 200 are related to the reference Figure 1corresponds to each step in the described method. Thus, the operations, features, and beneficial effects described above for the method also apply to the apparatus 200 and the units included therein, and will not be elaborated here.

[0083] Reference is now made to Figure 3 , which shows a schematic structural diagram of an electronic device 300 suitable for implementing some embodiments of the present disclosure. The electronic device in some embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0084] As Figure 3 shown, the electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0085] Generally, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 3 shows the electronic device 300 having various devices, it should be understood that it is not required to implement or include all the shown devices. Instead, more or fewer devices may be implemented or included. Figure 3 Each block shown in

[0086] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such some embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above functions defined in the methods of some embodiments of the present disclosure are performed.

[0087] It should be noted that the computer-readable medium described in some embodiments of the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0088] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0089] The above computer-readable medium can be included in the above electronic device; or can exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device is caused to: in response to detecting the order system login information corresponding to the order system sent by the target user terminal, determine the subject identifier to which the login user identifier included in the order system login information belongs, where the target user terminal is the terminal of the login user, and the order system corresponds to at least one user subject identifier and each database identifier; input the user subject identifier into a preset database configuration information generation model to obtain database configuration information, where the database configuration information includes a database identifier; connect to the order system database corresponding to the database identifier according to the database configuration information; determine whether the connection to the order system database is successful; in response to determining that the connection to the order system database is successful and receiving the operation request information corresponding to the order system sent by the target user terminal, generate request data information according to the operation request information and the order system database; and send the request data information to the corresponding target user terminal for display.

[0090] Computer program code for performing the operations of some embodiments of the present disclosure can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).

[0091] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0092] The units described in some embodiments of the present disclosure may be implemented in software or in hardware. The described units may also be provided in a processor. For example, it may be described as: a processor includes a first determination unit, an input unit, a connection unit, a second determination unit, a generation unit, and a transmission unit. Among them, the names of these units do not constitute a limitation on the unit itself in some cases. For example, the first determination unit may also be described as "the unit that determines the subject identifier to which the login user identifier included in the order system login information corresponding to the order system sent by the target user terminal belongs in response to detecting the order system login information of the corresponding order system".

[0093] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0094] The above description is only some preferred embodiments of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with (but not limited to) the technical features having similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A method for connecting to an order system database, comprising: Responding to detecting the order system login information corresponding to the order system sent by the target user terminal, determining the subject identifier to which the login user identifier included in the order system login information belongs, wherein the target user terminal is the terminal of the login user, and the order system corresponds to at least one user subject identifier and each database identifier; Inputting the user subject identifier into a preset database configuration information generation model to obtain database configuration information, wherein the database configuration information includes a database identifier; Connecting to the order system database corresponding to the database identifier according to the database configuration information; Determining whether the connection to the order system database is successful; Responding to determining that the connection to the order system database is successful and receiving the operation request information corresponding to the order system sent by the target user terminal, generating request data information according to the operation request information and the order system database; Sending the request data information to the corresponding target user terminal for display.

2. The method according to claim 1, wherein The database configuration information generation model is pre-generated through the following steps: Responding to detecting the user subject creation request information, determining whether the user subject creation request information includes user subject database information, wherein the user subject creation request information further includes a user subject identifier; Responding to determining that the user subject creation request information includes user subject database information, determining the control database configuration information according to the user subject database information; Generating a database configuration information generation model according to the user subject identifier and the control database configuration information.

3. The method according to claim 2, wherein, Before generating the database configuration information generation model according to the user subject identifier and the control database configuration information, the method further includes: Responding to determining that the user subject creation request information does not include user subject database information, sending a preset database creation request information to the database creation terminal; Responding to receiving the database creation completion information corresponding to the preset database creation request information sent by the database creation terminal, determining the control database configuration information according to the database creation information included in the database creation completion information.

4. The method according to claim 1, wherein The determining the subject identifier to which the login user identifier included in the order system login information belongs includes: Inputting the login user identifier included in the order system login information into a preset control subject identifier generation model to obtain at least one control subject identifier; Determining the quantity of each control subject identifier included in the at least one control subject identifier as the control subject identifier quantity; Responding to determining that the control subject identifier quantity meets the preset quantity condition, sending the respective control subject identifiers to the target user terminal for the login user to select; Responding to detecting the confirmed subject identifier sent by the target user terminal, determining the confirmed subject identifier as the subject identifier to which the login user identifier included in the order system login information belongs.

5. The method according to claim 1, wherein, The operation request information includes an operation type, and generating request data information based on the operation request information and the order system database includes: Determining a preset abstract class function corresponding to the operation type included in the operation request information as the abstract class function; Creating a database object corresponding to the order system database according to a preset unified data service function, where the abstract class function inherits the preset unified data service function; Invoking the abstract class function according to the database object to generate request data information.

6. The method according to claim 1, wherein Responding to receiving the operation request information corresponding to the order system sent by the target user terminal, and generating request data information based on the operation request information and the order system database, includes: Responding to receiving the operation request information corresponding to the order system sent by the target user terminal, and determining whether a lock identifier exists for the operation data included in the operation request information; Responding to determining that the lock identifier does not exist for the operation data, and generating request data information based on the operation request information and the order system database.

7. The method according to claim 1, wherein Determining whether the order system database is successfully connected includes: Obtaining a set of historical connection durations corresponding to the order system database; Determining the average value of each historical connection duration included in the set of historical connection durations as the historical average connection duration; Responding to determining that the current time does not meet the preset connection duration condition, and obtaining a sequence of historical connection information corresponding to the order system database, where the preset connection duration condition is that the connected duration is greater than the historical average connection duration, the connected duration is the interval duration between the current time and the time when connecting to the order system database, and the historical connection information in the sequence of historical connection information includes the connection time and the connection status; Inputting the sequence of historical connection information into a pre-trained prediction connection status generation model to obtain a predicted connection status; Responding to determining that the predicted connection status meets the preset connection status condition and detecting the preset database connection success information, and determining that the order system database is successfully connected; Responding to determining that the predicted connection status does not meet the preset connection status condition and the current time meets the preset connection failure duration condition, determining that the order system database is not successfully connected, and obtaining the current database performance information; Determining the connection failure type according to the current database performance information; Sending the connection failure type to the development terminal for development users to detect.

8. An order system database connection device, including: A first determination unit configured to, in response to detecting the order system login information corresponding to the order system sent by the target user terminal, determine the subject identifier to which the login user identifier included in the order system login information belongs, where the target user terminal is the terminal of the login user, and the order system corresponds to at least one user subject identifier and each database identifier; An input unit configured to input the user subject identifier into a preset database configuration information generation model to obtain database configuration information, where the database configuration information includes a database identifier; A connection unit, configured to connect to an order system database corresponding to the database identifier according to the database configuration information; A second determination unit, configured to determine whether the connection to the order system database is successful; A generation unit, configured to, in response to determining that the connection to the order system database is successful and receiving operation request information corresponding to the order system sent by the target user terminal, generate request data information according to the operation request information and the order system database; A sending unit, configured to send the request data information to the corresponding target user terminal for display.

9. An electronic device, comprising: One or more processors; A storage device having stored thereon one or more programs, When the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the method according to any one of claims 1-7.

10. A computer-readable medium having a computer program stored thereon, wherein, The computer program, when executed by a processor, implements the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Order identifier generation method and device, server and storage medium

    CN111694841A

  • PaaS-based database connection method and device, storage medium and product

    CN114201479A

  • Log information storage method, device and equipment, computer readable medium and product

    CN115391827A

  • Data processing method and device, electronic equipment and storage medium

    CN115437716A