A method, device, equipment and storage medium for processing data of application program
By obtaining a collection of database files from the mirror and performing batch adjustments on multiple sub-services in the application, the problem of low application adjustment efficiency in the existing technology is solved, and efficient application updates and rollbacks are achieved.
Patent Information
- Application Number
- CN202110562863.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-21
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-05-21
AI Technical Summary
During the application adjustment process, the existing technology is inefficient and requires each sub-service to be adjusted one by one, resulting in low efficiency.
By obtaining the software installation package of the target application, the installation package includes a set of N database files corresponding to N sub-services, obtained from N mirrors, and according to the P database file sets in the database file set, the N sub-services are The P subservice in the service is adjusted to the version indicated by the target version identifier, and the adjusted data information is stored in the database.
It realizes batch adjustment of multiple sub-services in the application, improves the efficiency of application adjustment, simplifies the process, and reduces resource usage.
Smart Images

Figure CN114675872B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and computer-readable storage medium for processing data of an application program. Background Art
[0002] With the continuous development of computer technology, a large number of applications have emerged on the Internet. In actual applications, each application often needs to be adjusted (such as updated or rolled back) over time to adapt to current needs. For example, after developers fix program vulnerabilities, they need to update the program; for another example, when a major error occurs in the new version of the program, it needs to be rolled back to the previous version. Practice has found that each application usually includes multiple sub-services. When adjusting the application, each sub-service needs to be adjusted one by one, which is inefficient. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, device and storage medium for processing data of an application program, which can improve the efficiency of adjusting the application program.
[0004] On the one hand, an embodiment of the present application provides a method for processing data of an application program, including:
[0005] In response to an adjustment instruction of a target application, a software installation package of the target application is obtained, the adjustment instruction carries a target version identifier, the target application includes N sub-services, the software installation package includes N database file sets corresponding to the N sub-services one by one, the N database file sets are obtained from N images corresponding to the N sub-services one by one, and N is a positive integer;
[0006] According to P database file sets in the N database file sets, P subservices in the N subservices are adjusted to the versions indicated by the target version identifier, to obtain data information of the P adjusted subservices, where P is a positive integer and is less than or equal to N;
[0007] The data information of the P adjusted sub-services is stored in a database to obtain an adjusted target application program.
[0008] On the other hand, an embodiment of the present application further provides a data processing device for an application program, including:
[0009] an acquisition unit, configured to acquire a software installation package of the target application in response to an adjustment instruction of the target application, the adjustment instruction carrying a target version identifier, the target application including N sub-services, the software installation package including N database file sets corresponding one-to-one to the N sub-services, the N database file sets being acquired from N images corresponding one-to-one to the N sub-services, where N is a positive integer;
[0010] A processing unit, used to adjust P of the N sub-services to the versions indicated by the target version identifier according to P of the N database file sets, to obtain data information of the P adjusted sub-services, where P is a positive integer and P is less than or equal to N; and used to store the data information of the P adjusted sub-services in a database to obtain an adjusted target application.
[0011] Correspondingly, an embodiment of the present application further provides an intelligent device, comprising: a storage device and a processor; the storage device stores a computer program; the processor executes the computer program to implement the above-mentioned data processing method for the application.
[0012] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the above-mentioned method for processing data for an application is implemented.
[0013] Accordingly, the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned data processing method for an application program.
[0014] In an embodiment of the present application, in response to an adjustment instruction of a target application, a software installation package of the target application is obtained, the software installation package includes N database file sets corresponding to N sub-services one by one, the N database file sets are obtained from N images corresponding to the N sub-services one by one, according to P database file sets in the N database file sets, the corresponding P sub-services are adjusted to the version indicated by the target version identifier, the data information of the P adjusted sub-services is obtained, the data information of the P adjusted sub-services is stored in the database, and the adjusted target application is obtained. It can be seen that by obtaining N database file sets from N images, multiple sub-services in the application can be adjusted in batches, thereby improving the efficiency of application adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1a A scene graph for data processing of an application provided in an embodiment of the present application;
[0017] Figure 1b An architecture diagram of data processing for an application provided in an embodiment of the present application;
[0018] Figure 2 A flowchart of a method for processing data of an application program provided in an embodiment of the present application;
[0019] Figure 3 A flowchart of another method for processing application data provided by an embodiment of the present application;
[0020] Figure 4a A schematic diagram of upgrading all sub-services of a target application to a version indicated by a target version identifier provided in an embodiment of the present application;
[0021] Figure 4b A schematic diagram of rolling back all sub-services of a target application to a version indicated by a target version identifier provided in an embodiment of the present application;
[0022] Figure 5 A data processing flow chart for an application provided in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of the structure of a data processing device for an application program provided in an embodiment of the present application;
[0024] Figure 7 A schematic diagram of the structure of a smart device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0026] The present application relates to blockchain and cloud technology. Blockchain is a new application model of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. It is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain may include a blockchain underlying platform, a platform product service layer, and an application service layer. In some embodiments, the sub-services in the application service layer can be batch adjusted (updated or rolled back) by the data processing method provided in this application, thereby improving the efficiency of sub-service adjustment in the application service layer.
[0027] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0028] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.
[0029] As a cloud computing basic capability provider, a cloud computing resource pool will be established, also known as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform, in which various types of virtual resources are deployed for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0030] According to the logical functional division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer, or SaaS can be deployed directly on the IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS. In some embodiments, the sub-services in SaaS can be batch adjusted (updated or rolled back) through the data processing method provided in this application, thereby improving the efficiency of sub-service adjustment in SaaS.
[0031] See also Figure 1a , Figure 1a A scene diagram for data processing of an application provided in an embodiment of the present application. Figure 1a As shown, the scenario of data processing for the application may include a terminal device 101 and a server 102. Among them, the terminal device 101 is a device used by the user. The number of terminal devices 101 can be one or more, and the form of the terminal device 101 is only used for example. The terminal device 101 may include but is not limited to: smart phones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, mobile Internet devices (Mobile Internet Devices, MID) and other devices; the terminal device is often equipped with a display device, which may also be a display, a display screen, a touch screen, etc. The touch screen may also be a touch screen, a touch panel, etc., which is not limited in the embodiments of the present application.
[0032] The server 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. In addition, the server 102 may also be a network node in a blockchain network. The terminal device 101 and the server 102 may be directly or indirectly connected via wired or wireless communication, and this application is not limited here. In one embodiment, a user (such as a developer) may send an adjustment instruction to the server 102 via the terminal device 101 so that the server 102 adjusts (such as upgrades or rollbacks) the target application deployed in the server 102 according to the adjustment instruction.
[0033] It should be noted that Figure 1a The number of terminal devices and servers in the processing system of the application shown is only an example. For example, the number of terminal devices and servers can be multiple, and this application does not limit the number of terminal devices and servers.
[0034] In one embodiment, Figure 1a The scenario diagram for data processing of the application shown may also only include the terminal device 101. Specifically, the user can input an adjustment instruction in the terminal device 101 so that the terminal device 101 adjusts the sub-service in the target application in the terminal device according to the adjustment instruction; for example, when the user is using the computer, he can upgrade application A by clicking the "Upgrade" button of application A.
[0035] See also Figure 1b , Figure 1b An architectural diagram of data processing for an application provided in an embodiment of the present application. The method in the embodiment of the present application is applied to a management end, and the management end is a smart device, which can be, for example, a terminal device used by some of the users mentioned above, or a server with special functions. The method includes the following steps:
[0036] (1) The smart device (ie, the management end) obtains a software installation package of the target application in response to an adjustment instruction of the target application (eg, the smart device detects an adjustment instruction input by a user).
[0037] The adjustment instruction carries a target version identifier (i.e., the target application needs to be adjusted to the version indicated by the target version identifier through the software installation package), the target application includes N sub-services (such as verification sub-services, payment sub-services, multimedia rendering sub-services, etc.), and the software installation package includes N database file sets corresponding to the N sub-services, and the N database file sets are obtained from N images corresponding to the N sub-services, where N is a positive integer. An image is similar to a file compression package, which makes a specific series of files (such as database files) into a single file in a certain format for subsequent use.
[0038] Depend on Figure 1bIt can be known that the installation package of the target application program can be obtained by packaging N images corresponding to N sub-services in the target application program and related configuration files through an automated pipeline, and the images are provided by developers. In one embodiment, the intelligent device obtains the target image corresponding to the target sub-service among the N sub-services of the target application program; creates a target container based on the target image, and extracts database files from the target image through the target container to obtain the database file set of the target sub-service; after obtaining the N database file sets of the N sub-services according to the above operations, packages these N database file sets to obtain the software installation package of the target application program. Among them, the role of the container is to obtain the database files contained in the image from the image.
[0039] Each image includes at least one database file, and the identifier of each database file carries the version identifier (such as version number) corresponding to the database file. In one embodiment, each database file needs to be named according to a preset syntax rule and stored in a specified path, so that the intelligent device can identify and obtain the corresponding database file when adjusting the target application program according to the software installation package of the target application program.
[0040] (2) According to P database file sets among the N database file sets, adjust P sub-services among the N sub-services to the version indicated by the target version identifier to obtain the data information of P adjusted sub-services, where P is a positive integer and P is less than or equal to N.
[0041] When P = N, that is, the intelligent device adjusts all sub-services (N sub-services) of the target application program according to the N database file sets (such as upgrading to the target version or rolling back to the target version); when P < N, that is, the intelligent device adjusts P sub-services in the target application program according to P database file sets; for example, the intelligent device adjusts P sub-services corresponding to the payment function in the target application program according to the software installation package of the target application program.
[0042] It can be known from Figure 1b that the process of the intelligent device adjusting the target application program according to the software installation package of the target application program includes: database file collection (that is, reading the database files required for adjustment from the software installation package of the target application program); sub-service initialization information management (such as configuring relevant parameters before adjusting the sub-service); sub-service data adjustment (that is, adjusting the data of the sub-service to be adjusted according to the database file corresponding to the sub-service to be adjusted); database initialization adapter (that is, determining the matching initialization adapter according to the type of the database file).
[0043] (3) The data information of the P adjusted sub-services is stored in a database to obtain the adjusted target application.
[0044] Depend on Figure 1b It can be seen that after the smart device batch adjusts the P sub-services according to the software installation package of the target application, it stores the adjusted sub-services in the database to obtain the adjusted target application. In one embodiment, the adjusted sub-service carries the adjusted database version identifier of the sub-service.
[0045] In an embodiment of the present application, in response to an adjustment instruction of a target application, a software installation package of the target application is obtained, the software installation package includes N database file sets corresponding to N sub-services one by one, the N database file sets are obtained from N images corresponding to the N sub-services one by one, according to P database file sets in the N database file sets, the corresponding P sub-services are adjusted to the version indicated by the target version identifier, the data information of the P adjusted sub-services is obtained, the data information of the P adjusted sub-services is stored in the database, and the adjusted target application is obtained. It can be seen that by obtaining N database file sets from N images, multiple sub-services in the application can be adjusted in batches, thereby improving the efficiency of application adjustment.
[0046] See also Figure 2 , Figure 2 A flowchart of a method for processing data of an application program provided in an embodiment of the present application. The method in an embodiment of the present application is applied to a smart device, which can be, for example, a terminal device used by some users mentioned above, or a server with special functions. The method includes the following steps.
[0047] S201: In response to the adjustment instruction of the target application, the software installation package of the target application is obtained. The adjustment instruction carries a target version identifier, which is used to indicate the version to which the target application needs to be adjusted; for example, if the current version identifier of the target application is 1.2.1, and the target version identifier carried by the adjustment instruction is 3.0.1, the terminal device upgrades the target application to version 3.0.1 according to the adjustment instruction; for another example, if the current version identifier of the target application is 4.1.1, and the target version identifier carried by the adjustment instruction is 3.0.1, the terminal device rolls back the target application to version 3.0.1 according to the adjustment instruction.
[0048] The target application includes N sub-services, and the N sub-services can be divided into M sub-service sets according to a division rule (such as division according to the functions of each sub-service), where M and N are positive integers, and M is less than or equal to N. The software installation package of the target application includes N database file sets corresponding to the N sub-services one by one, and the N database file sets are obtained from N images corresponding to the N sub-services one by one, each image may include one or more database files, and the identifier of each database file carries a version identifier (such as a version number) corresponding to the database file, and the database file is used to describe the detailed table creation and other operation contents of the sub-service initialization database.
[0049] In one embodiment, each database file needs to be named according to a preset grammatical rule and stored in a specified path, so that the smart device can identify and obtain the corresponding database file when adjusting the target application according to the software installation package of the target application.
[0050] S202: According to P database file sets in N database file sets, P subservices in N subservices are adjusted to the versions indicated by the target version identifier to obtain data information of the P adjusted subservices, where P is a positive integer and P is less than or equal to N.
[0051] In one embodiment, the smart device determines P sub-services to be adjusted from the N sub-services according to the filtering rules, and the filtering rules can be formulated by the user according to actual conditions; for example, if the user needs to adjust the entire target application, the filtering rules can be formulated as select all; for example, if the user needs to adjust some sub-services in the target application, the filtering rules can be formulated according to the identification of the sub-service to be adjusted (such as the name of the sub-service, identification number, etc.).
[0052] After determining the P sub-services to be adjusted, the smart device obtains a database file set corresponding to each of the P sub-services from the software installation package of the target application; wherein the database file set corresponding to each sub-service includes at least one version of a database file under the sub-service, and each database file is named according to the version identifier to which the database file belongs.
[0053] In one embodiment, the smart device obtains a target image corresponding to a target subservice among the N subservices of the target application; creates a target container based on the target image, and extracts database files from the target image through the target container to obtain a database file set of the target subservice; after obtaining N database file sets of N subservices according to the above operation, the N database file sets are packaged to obtain a software installation package of the target application. For example, subservice 1 corresponds to image A, and image A includes database files from version identifier 1.0.0 to version identifier 4.3.1; then the smart device creates container A based on image A, and extracts (copies) database files from version identifier 1.0.0 to version identifier 4.3.1 from image A through container A to obtain a database file set of subservice 1. After obtaining the database file sets of all subservices of the target application, the smart device packages these database file sets to obtain a software installation package of the target application. In one embodiment, after extracting the data file set from the target image, the smart device deletes the created target container to reduce unnecessary resource usage.
[0054] After obtaining the database file set corresponding to each of the P sub-services from the software installation package, the smart device adjusts the P sub-services according to the database file set corresponding to each of the P sub-services, and obtains data information of the P adjusted sub-services. In one embodiment, the smart device determines an adapter that matches the type of the database file in the database file set corresponding to the target sub-service, and calls the adapter to execute the database file in the database file set corresponding to the target sub-service, and obtains the data information of the adjusted target sub-service. During the adjustment process, the smart device first selects database files that meet the conditions from the database file set according to the current version number and the target version number of the target sub-service, and calls the adapter to execute the database files that meet the conditions in the target order to adjust the target sub-service to obtain the adjusted data information of the target sub-service; for example, assuming that the current version identifier of the target sub-service is 2.1.1 and the target version identifier is 3.0.1, the smart device selects database files from the current identifier 2.1.2 to the version identifier 3.0.1 from the database file set corresponding to the target sub-service, and calls the adapter to execute the database files from the current identifier 2.1.2 to the version identifier 3.0.1 in order from small to large; for another example, assuming that the current version identifier of the target sub-service is 2.1.1 and the target version identifier is 1.0.1, the smart device selects database files from the current identifier 1.0.1 to the version identifier 2.1.0 from the database file set corresponding to the target sub-service, and calls the adapter to execute the database files from the current identifier 2.1.0 to the version identifier 1.0.1 in order from large to small.
[0055] S203: Store the data information of the P adjusted sub-services in a database to obtain the adjusted target application. In one embodiment, the database stores the data information of the N sub-services of the target application, and the data information of each sub-service carries the current version identifier of the sub-service. When the smart device adjusts the sub-service according to the software installation package of the target application, the current version identifier of the sub-service will also be updated to the adjusted version identifier, so that the next time the sub-service needs to be adjusted, the smart device can obtain the current version identifier of the sub-service from the database.
[0056] In an embodiment of the present application, in response to an adjustment instruction of a target application, a software installation package of the target application is obtained, the software installation package includes N database file sets corresponding to N sub-services one by one, the N database file sets are obtained from N images corresponding to the N sub-services one by one, according to P database file sets in the N database file sets, the corresponding P sub-services are adjusted to the version indicated by the target version identifier, the data information of the P adjusted sub-services is obtained, the data information of the P adjusted sub-services is stored in the database, and the adjusted target application is obtained. It can be seen that by using the images corresponding to each sub-service, N database file sets corresponding to N sub-services can be obtained, and based on these N database file sets, multiple sub-services in the application can be adjusted in batches, thereby improving the efficiency of application adjustment.
[0057] See also Figure 3 , Figure 3 A flowchart of another method for processing data of an application program provided in an embodiment of the present application. The method in an embodiment of the present application is applied to a smart device, which can be, for example, a terminal device used by some of the users mentioned above, or a server with special functions. The method includes the following steps.
[0058] S301: In response to an adjustment instruction of a target application, a software installation package of the target application is obtained. The target application includes N sub-services, and the software installation package of the target application includes N database file sets corresponding to the N sub-services. The database file set corresponding to the target sub-service may include one or more database files (i.e., including database files of different versions under the target sub-service), and each database file is named according to the version identifier to which the database file belongs.
[0059] In one embodiment, the process of the smart device obtaining the software installation package of the target application includes: obtaining a target image corresponding to the target subservice in the N subservices; creating a target container based on the target image, and extracting the database file from the target image through the target container to obtain the database file set of the target subservice. In one embodiment, the smart device creates a target container, and copies the database file in the target image to the target container to obtain the database file set of the target subservice. After obtaining the N database file sets corresponding to each of the N subservices, the smart device packages the N database file sets into the software installation package of the target application.
[0060] Specifically, each image may include database files of multiple adjustment strategies (such as upgrade or rollback) (such as database files for upgrade and database files for rollback); the smart device may add database files of multiple adjustment strategies to the same database file set to obtain N database file sets corresponding to each of the N sub-services. Database files of different adjustment strategies may also be added to different database file sets according to the adjustment strategy; for example, database files for upgrade are added to the upgrade database file set, and database files for rollback are added to the rollback database file set; further, the N upgrade database file sets corresponding to each of the N sub-services are packaged in the upgrade software installation package, and the N rollback database file sets corresponding to each of the N sub-services are packaged in the rollback software installation package.
[0061] In another embodiment, the N sub-services belong to M service types, M is a positive integer, and M is less than or equal to N; the software installation package of the target application is obtained by classifying and packaging the N database file sets according to the M service types. That is to say, in the process of packaging the N database file sets, the software installation package of the target application will pre-process the N database file sets (such as pre-classifying or sorting them). Compared with directly storing the N database file sets in a folder, pre-processing the N database file sets can enable the smart device to more efficiently obtain the required database file set when adjusting the target application according to the software installation package of the target application.
[0062] In one embodiment, it is assumed that each sub-service in the target application is deployed according to a sorting rule during deployment, or each sub-service corresponds to a serial number; then in the process of packaging the software installation package of the target application, the database file collection can be sorted and packaged according to the sorting rule or serial number; it can be understood that the smart device can quickly obtain the required database file collection from the software installation package of the target application according to the sorting rule or serial number, without having to traverse and search the database file collection in the software installation package of the target application every time the database file collection is needed, thereby improving the adjustment efficiency of the target application and effectively saving computer resources.
[0063] In yet another embodiment, during packaging of N database file sets, database files belonging to different functions are stored in different directories, so that the smart device can quickly obtain the required database files when adjusting the target application according to the software installation package of the target application.
[0064] It should be noted that the software installation package corresponding to the target application is pre-packaged and placed on the smart device (such as stored in the memory) before the adjustment instruction is executed; in one embodiment, when one or more sub-services in the target application need to be upgraded to a higher version, it is necessary to make an appointment to package the database file set required for the upgrade through the pipeline, and place the packaged software installation package on the smart device; for example, assuming that the user needs to upgrade application 1 from version 1.0 to version 2.1, then before entering the adjustment instruction, it is necessary to package the database file set of each sub-service in application 1 from version 1.0 to version 2.1 through the pipeline, and place the packaged software installation package on the smart device.
[0065] S302: Determine P subservices to be adjusted from N subservices according to the screening rules. The screening rules can be formulated by the user according to the actual situation; for example, if the user needs to adjust the entire target application, the screening rule can be formulated as Select All (i.e., make full adjustments (all subservices) to the target application); for another example, if the user needs to adjust some subservices in the target application, the screening rule can be formulated according to the identifier of the subservice to be adjusted (such as the name of the subservice, the identification number, etc.) (such as only adjusting the subservice with the target field in the name, or only adjusting the subservice with an identification number less than the target identification number).
[0066] S303: Determine an adapter that matches the database file set corresponding to the target subservice according to the type of the database file in the database file set corresponding to the target subservice. The target subservice may be any one of the P subservices to be adjusted determined from the N subservices according to the screening rule. The type of the database file may include, but is not limited to, MySQL type and TDSQL type.
[0067] In the actual deployment process, you may encounter situations where the types of imported database files are different and the database operation statements that need to be executed are different. For example, there are certain differences between the MySQL database and the TDSQL database. For scenarios where there are differences in the databases, the smart device can appropriately modify the file identifier (such as the file name) of the database file. For example, in the MySQL database, the file identifier of the initialization database file is "init_x.xxsql". In order to adapt to the TDSQL database, the device can modify the file identifier of the initialization database file to "tdsql_init_x.xxsql". When the user adjusts the target application, specify the type of database file in the software installation package of the target application. The smart device can find all database files under the type of the database file according to the above grammatical rules, and adjust the target application based on these database files.
[0068] S304: Adjust the target sub-service through an adapter that matches the database file set corresponding to the target sub-service to obtain the adjusted data information of the target sub-service. In one embodiment, the smart device determines the version identification interval based on the current version identification of the target sub-service and the target version identification; for example, if the current version identification of sub-service 1 is 2.1.1 and the target version identification is 3.0.1, the smart device determines the version identification interval as 2.1.2 to 3.0.1 based on the current version identification 2.1.1 of sub-service 1 and the target version identification 3.0.1; similarly, if the current version identification of sub-service 1 is 2.1.1 and the target version identification is 1.2.1, the smart device determines the version identification interval as 1.2.1 to 2.1.0 based on the current version identification 2.1.1 of sub-service 1 and the target version identification 1.2.1.
[0069] After determining the version identification interval, the adapter that matches the database file set corresponding to the target sub-service is intelligently called, and at least one database file in the database file set corresponding to the target sub-service is executed to obtain the adjusted data information of the target sub-service, where the version identification of the at least one database file belongs to the version identification interval; for example, assuming that the version identification interval is 1.2.1 to 2.1.0, the database file set corresponding to the target sub-service includes: a database file with a version identification of 1.0.1, a database file with a version identification of 1.3.1, a database file with a version identification of 2.0.1, a database file with a version identification of 2.1.2 and a database file with a version identification of 3.2.1; then the adapter that matches the database file set corresponding to the target sub-service is intelligently called, and the database file with a version identification of 1.3.1 and the database file with a version identification of 2.0.1 are executed to obtain the adjusted data information of the target sub-service.
[0070] In one embodiment, the database file set corresponding to the target sub-service includes multiple database files belonging to the version identification interval; the intelligent device calls the adapter that matches the database file set corresponding to the target sub-service, and executes the database files belonging to the version identification interval in the database file set corresponding to the target sub-service in sequence according to the target order to obtain the adjusted data information of the target sub-service; the target order is determined according to the adjustment strategy of the target sub-service, and the adjustment strategy of the target sub-service is determined according to the current version identification of the target sub-service and the target version identification. Specifically, the adjustment strategy includes upgrade and rollback. If the current version identification of the target sub-service is less than the target version identification, the intelligent device will adjust the strategy to upgrade, and the target sequence corresponding to the upgrade is from small to large; if the current version identification of the target sub-service is greater than the target version identification, the intelligent device will adjust the strategy to rollback, and the target sequence corresponding to the rollback is from large to small. In actual applications, drop or delete statements are not allowed in database files used for upgrades.
[0071] For example, assuming that the current version identifier of the target sub-service is 2.1.1 and the target version identifier is 3.0.1, the smart device determines the adjustment strategy of the target sub-service as upgrade; the smart device filters out database files from the current identifier 2.1.2 to the version identifier 3.0.1 from the database file set corresponding to the target sub-service, and calls the adapter to execute the database files from the current identifier 2.1.2 to the version identifier 3.0.1 in order from small to large; for another example, assuming that the current version identifier of the target sub-service is 2.1.1 and the target version identifier is 1.0.1, the smart device determines the adjustment strategy of the target sub-service as rollback; the smart device filters out database files from the current identifier 1.0.1 to the version identifier 2.1.0 from the database file set corresponding to the target sub-service, and calls the adapter to execute the database files from the current identifier 2.1.0 to the version identifier 1.0.1 in order from large to small.
[0072] In another embodiment, the identifier of each database file carries an adjustment type field; the intelligent device determines the adjustment strategy based on the current version identifier of the target sub-service and the target version identifier. Specifically, the intelligent device determines the target field based on the current version identifier of the target sub-service and the target version identifier, and the target field is used to indicate the adjustment strategy. Specifically, if the current version identifier of the target sub-service is less than the target version identifier, the intelligent device determines the first field (such as the "init" field) as the target field; if the current version identifier of the target sub-service is greater than the target version identifier, the intelligent device determines the second field (such as the "undo" field) as the target field. It should be noted that the first field and the second field in this application are only used for example and do not constitute an actual limitation of this application. For example, the first field can also be "create" and the second field can also be "delete".
[0073] The adjustment strategy is used to filter out the database files to be executed from the database file set corresponding to the target sub-service, and the adjustment type field of the database files to be executed matches the adjustment strategy; specifically, the smart device filters out the database files whose file identifiers carry the target field and whose version identifiers belong to the version identifier interval from the database file set corresponding to the target sub-service according to the target field, and determines these database files as the database files to be executed; for example, assuming that the version identifier interval is determined to be 1.2.1 to 2.1.0, the target field is "init", and the database files included in the database file set corresponding to sub-service 1 are: init_1.0.1.sql, init_1.2.3.sql, init_2.0.1.sql, init_3.0.1.sql, undo_1.0.2.sql, undo_1.3.1.sql, undo_2.2.3.sql, undo_3.1.3.sql; then the smart device determines the database files init_1.2.3.sql and init_2.0.1.sql as the database files to be executed.
[0074] Furthermore, the smart device calls an adapter that matches the database file set corresponding to the target sub-service, executes the database file to be executed, and obtains the adjusted data information of the target sub-service.
[0075] In actual applications, if the smart device detects that there is currently an operation to adjust the database (such as initializing the database), the database files are uniformly stored in the specified directory of the image; for example, the database files are uniformly stored in the / usr / local / services / sql directory, and the file suffix of the database files is unified as ".sql". Furthermore, the stability of the target application during the adjustment process can be improved by standardizing the identification (such as naming) of the database files. In one embodiment, the database file used for upgrading can be named: init_version number.sql; for example, init_2.5.0.sql. The database file used for rollback can be named: undo_version number.sql; for example, undo_2.5.0.sql. It should be noted that file naming is only a way to facilitate cognition and use, and the scheme is not limited to one naming method. For example, create_x.sql and delete_x.sql can also be used for naming.
[0076] Figure 4aA schematic diagram of an embodiment of the present application for upgrading all sub-services of a target application to the version indicated by the target version identifier. If a certain version has been deployed in the smart device, and the identifier of the target version carried in the adjustment instruction is greater than the deployed version (i.e., the current version), then the following steps can be followed: Figure 4a Upgrade in the manner shown: the smart device finds the database file set corresponding to each sub-service. The database file set of the target sub-service includes all database files carrying the "init" field between the deployment version and the target version of the target sub-service. The smart device then calls an adapter that matches the type of the database file, and executes all database files carrying the "init" field in the database file set of the target sub-service between the deployment version and the target version of the target sub-service in ascending order of the serial number of the database file version identifier to obtain the adjusted data information of the target sub-service.
[0077] like Figure 4a As shown, assume that the adjustment instruction indicates to adjust the target application from version 1.0.0 to version 2.0.0, the target application includes sub-service A and sub-service B, in the database file set corresponding to sub-service A, the adjustment type field is "init", and the data files whose version identifiers belong to the version identifier range 1.0.0 to 2.0.0 are: init_1.0.1.sql, init_1.5.1.sql and init_1.5.3.sql three database files, the smart device calls the adapter that matches the type of the database file, and upgrades sub-service A to the version indicated by the target version identifier in the order of init_1.0.1.sql—>init_1.5.1.sql—>init_1.5.3.sql. version; similarly, in the database file set corresponding to sub-service B, the adjustment type field is "init", and the data files whose version identifiers belong to the version identifier range of 1.0.0 to 2.0.0 are: init_1.0.1.sql, init_1.5.1.sql and init_1.8.0.sql. The smart device calls the adapter that matches the type of the database file, and upgrades sub-service B to the version indicated by the target version identifier in the order of init_1.0.1.sql—>init_1.5.1.sql—>init_1.8.0.sql. Similarly, the smart device can upgrade all sub-services in the containers of each sub-service to the version indicated by the target version identifier.
[0078] Figure 4bA schematic diagram of an embodiment of the present application for rolling back all sub-services of a target application to the version indicated by the target version identifier. If a certain version has been deployed in the smart device, and the identifier of the target version carried in the adjustment instruction is smaller than the deployed version (i.e., the current version), then the following steps can be followed: Figure 4b Roll back in the manner shown: the smart device finds the database file collection corresponding to each sub-service. The database file collection of the target sub-service includes all database files carrying the "undo" field between the deployment version and the target version of the target sub-service. The smart device then calls the adapter that matches the type of the database file, and executes all database files carrying the "undo" field in the database file collection of the target sub-service between the deployment version and the target version of the target sub-service in descending order according to the serial number of the database file version identifier, to obtain the adjusted data information of the target sub-service.
[0079] like Figure 4b As shown, assume that the adjustment instruction indicates to adjust the target application from version 2.0.0 to version 1.0.0, the target application includes sub-service A and sub-service B, in the database file set corresponding to sub-service A, the adjustment type field is "undo", and the data files whose version identifiers belong to the version identifier range 1.0.0 to 2.0.0 are: undo_1.0.1.sql, undo_1.5.1.sql and undo_1.5.3.sql three database files, the smart device calls the adapter that matches the type of the database file, and rolls back sub-service A to the target version identifier in the order of undo_1.5.3.sql—>init_1.5.1.sql—>init_1.0.1.sql. version; similarly, in the database file set corresponding to sub-service B, the adjustment type field is "undo", and the data files whose version identifiers belong to the version identifier range of 1.0.0 to 2.0.0 are: undo_1.0.1.sql, undo_1.5.1.sql and undo_1.8.0.sql. The smart device calls the adapter that matches the type of the database file, and rolls back sub-service B to the version indicated by the target version identifier in the order of undo_1.8.0.sql—>init_1.5.1.sql—>init_1.0.1.sql. Similarly, the smart device can roll back all sub-services in the containers of each sub-service to the version indicated by the target version identifier.
[0080] It is understandable that for scenarios where certain functional modules in the target application need to be upgraded separately, the user can specify the sub-service that needs to be adjusted by configuring the sub-service identifier (such as name) and the sub-service version identifier (such as version number). The smart device will adjust the sub-service specified by the user separately according to the above adjustment strategy without affecting other sub-services.
[0081] In one embodiment, among the P sub-services, the data information of each sub-service carries a current version identifier; further, in response to the successful adjustment of the P sub-services; the current version identifiers of the P sub-services are replaced with the target version identifier to obtain the data information of the P adjusted sub-services; for example, in the data information of sub-service 1 before adjustment, the version identifier is 1.2.1, and the target version identifier is 2.0.1, then in response to the successful adjustment of sub-service 1, the smart device updates the version identifier in the data information of sub-service 1 to 2.0.1.
[0082] S305: Store the data information of the P adjusted sub-services into the database to obtain the adjusted target application. The specific implementation of step S305 can be found in Figure 2 The implementation of step S203 will not be repeated here.
[0083] Figure 5 A data processing flow chart for an application provided in an embodiment of the present application. Figure 1b and Figure 5A method for processing data of an application provided in an embodiment of the present application is fully introduced as follows: (1) The smart device decompresses the software installation package of the target application to obtain a database file set of each sub-service in the target application. The database file set of each sub-service in the target application is obtained from the image of each sub-service in the target application by creating a container. The smart device traverses the database files in each database file set according to the adjustment instruction to obtain a database file that meets the requirements. (2) The smart device selects an initialization adapter that matches the type of the database file according to the type of the database file. Different database files correspond to different adapters (such as MySQL adapter and TDSQL adapter). In addition, the smart device will perform some related adaptation operations (such as syntax conversion) according to the type of the database file. (3) The smart device calls the initialization adapter to execute the database files in the database file set of each sub-service in the container according to the version number sequence size (executed in order from small to large during upgrade and in order from large to small during rollback); in some embodiments, the database files in the database file set are obtained by screening according to the screening rules specified by the user. (4) Each sub-service will store the currently deployed version number in the database. When the smart device detects that the adjustment is successful, the currently deployed version number will be updated to the version number indicated by the target version identifier, so that when the target application is subsequently adjusted, it can be compared with the version number carried in the adjustment instruction.
[0084] The embodiments of this application are Figure 2 On the basis of the embodiment, the smart device obtains the database file set corresponding to each sub-service from the image corresponding to each sub-service in the target application by creating a container, so that each sub-service only operates its own database and table, and different sub-services do not interfere with each other, so as to facilitate batch adjustment of multiple sub-services in the target application (that is, centralized management of the database, batch upgrade or rollback of the database); by pre-processing the database file set (naming, sorting) during the packaging of the software installation package, the efficiency of the target application adjustment can be further improved; by selecting different adapters, different types of database files can be adapted, thereby improving universality. In addition, sub-service developers only need to provide service container images in accordance with the specifications, without providing additional content. The container image itself is the content required for containerized deployment, with low transformation cost and low invasiveness.
[0085] The method of the embodiment of the present application is described in detail above. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the device of the embodiment of the present application is provided below accordingly.
[0086] See also Figure 6 , Figure 6A schematic diagram of a data processing device for an application provided in an embodiment of the present application, the device can be mounted on Figure 1a On the terminal device 101, or the server 102 shown. Figure 6 The data processing device for the application program shown can be used to execute the above Figure 2 and Figure 3 Part or all of the functions of the method embodiment described. The detailed description of each unit is as follows:
[0087] An acquisition unit 601 is configured to acquire a software installation package of the target application in response to an adjustment instruction of the target application, the adjustment instruction carrying a target version identifier, the target application including N sub-services, the software installation package including N database file sets corresponding one-to-one to the N sub-services, the N database file sets being acquired from N images corresponding one-to-one to the N sub-services, where N is a positive integer;
[0088] Processing unit 602 is used to adjust P of the N sub-services to the versions indicated by the target version identifier according to P of the N database file sets, and obtain data information of the P adjusted sub-services, where P is a positive integer and P is less than or equal to N; and to store the data information of the P adjusted sub-services in a database to obtain an adjusted target application.
[0089] In one embodiment, the processing unit 602 is specifically configured to:
[0090] Obtain a target image corresponding to a target subservice among the N subservices;
[0091] Creating a target container based on the target image, and extracting a database file from the target image through the target container to obtain a database file set of the target sub-service, wherein the database file set of the target sub-service includes: database files of different versions under the target sub-service, and the database files in the database file set of the target sub-service are named according to the version identifier to which the database file belongs;
[0092] A software installation package of the target application is generated according to the database file set of the target sub-service.
[0093] In one embodiment, the processing unit 602 is specifically configured to:
[0094] Determine P sub-services to be adjusted from N sub-services according to the screening rules;
[0095] Determining an adapter that matches the database file set corresponding to the target subservice according to the type of the database file in the database file set corresponding to the target subservice, wherein the target subservice is any one of the P subservices to be adjusted that are determined from the N subservices according to the screening rule;
[0096] The target sub-service is adjusted through an adapter that matches the database file set corresponding to the target sub-service to obtain adjusted data information of the target sub-service.
[0097] In one embodiment, each image includes at least one database file, and each database file in the at least one database file carries an identifier of a corresponding database; the processing unit 602 is specifically configured to:
[0098] Determine a version identification interval according to the current version identification of the target subservice and the target version identification;
[0099] Call an adapter that matches the database file set corresponding to the target sub-service, execute at least one database file in the database file set corresponding to the target sub-service, and obtain the adjusted data information of the target sub-service, wherein the version identifier of the at least one database file belongs to the version identifier interval.
[0100] In one embodiment, the database file set corresponding to the target sub-service includes a plurality of database files belonging to the version identification interval; the processing unit 602 is specifically configured to:
[0101] Calling an adapter that matches the database file set corresponding to the target sub-service, and sequentially executing the database files in the database file set corresponding to the target sub-service that belong to the version identification interval in a target order, to obtain adjusted data information of the target sub-service;
[0102] The target order is determined according to an adjustment policy of the target sub-service, and the adjustment policy of the target sub-service is determined according to a current version identifier of the target sub-service and the target version identifier.
[0103] In one embodiment, the identifier of each database file carries an adjustment type field; the processing unit 602 is specifically configured to:
[0104] Determining an adjustment strategy according to the current version identifier of the target subservice and the target version identifier;
[0105] Filtering out a to-be-executed database file from a database file set corresponding to the target sub-service by using the adjustment strategy, wherein the adjustment type field of the to-be-executed database file matches the adjustment strategy;
[0106] An adapter matching the database file set corresponding to the target sub-service is called to execute the database file to be executed, and to obtain the adjusted data information of the target sub-service.
[0107] In one embodiment, among the P sub-services, the data information of each sub-service carries a current version identifier; the processing unit 602 is specifically configured to:
[0108] In response to the P sub-services being adjusted successfully;
[0109] The current version identifiers of the P sub-services are replaced with the target version identifiers to obtain data information of the P adjusted sub-services.
[0110] In one embodiment, the N sub-services belong to M service types, where M is a positive integer and is less than or equal to N; the software installation package of the target application is obtained by classifying and packaging the N database file sets according to the M service types.
[0111] According to one embodiment of the present application, Figure 2 and Figure 3 Some of the steps involved in the data processing method for the application shown can be represented by Figure 6 The application is executed by each unit in the data processing device shown. For example, Figure 2 The step S201 shown in FIG. 1 can be performed by Figure 6 The acquisition unit 601 shown in FIG. 6 is executed, and step S202 and step S203 can be performed by Figure 6 Processing unit 602 is shown executing. Figure 3 The step S301 shown in FIG. Figure 6 The acquisition unit 601 shown in FIG. 6 is executed, and steps S302 to S305 can be performed by Figure 6 Processing unit 602 is shown executing. Figure 6 The various units in the data processing device for the application shown can be separately or all combined into one or several other units to constitute, or one (some) of the units can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the data processing device for the application can also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0112] According to another embodiment of the present application, the program can be executed by running on a general computing device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 2 and Figure 3 A computer program (including program code) for each step involved in the corresponding method shown in Figure 6 The data processing device for the application program shown in and the data processing method for the application program in the embodiment of the present application are implemented. The computer program can be recorded on, for example, a computer readable recording medium, and loaded into the above-mentioned computing device through the computer readable recording medium and run therein.
[0113] Based on the same inventive concept, the principles and beneficial effects of solving the problem for the data processing device of the application provided in the embodiments of the present application are similar to the principles and beneficial effects of solving the problem for the data processing device of the application in the method embodiments of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.
[0114] See also Figure 7 , Figure 7 A schematic diagram of the structure of an intelligent device provided in an embodiment of the present application, the intelligent device at least includes a processor 701, a communication interface 702 and a memory 703. Among them, the processor 701, the communication interface 702 and the memory 703 can be connected via a bus or other means. Among them, the processor 701 (or central processing unit (CPU)) is the computing core and control core of the terminal, which can parse various instructions in the terminal and process various data of the terminal. For example, the CPU can be used to parse the power on and off instructions sent by the user to the terminal, and control the terminal to perform power on and off operations; for example, the CPU can transmit various types of interactive data between the internal structures of the terminal, and so on. The communication interface 702 can optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), which can be used to send and receive data under the control of the processor 701; the communication interface 702 can also be used for the transmission and interaction of internal data of the terminal. The memory 703 (Memory) is a memory device in the terminal for storing programs and data. It can be understood that the memory 703 here can include both the built-in memory of the terminal and the extended memory supported by the terminal. The memory 703 provides a storage space, which stores the operating system of the terminal, including but not limited to: Android system, iOS system, Windows Phone system, etc., which is not limited in this application.
[0115] In the embodiment of the present application, the processor 701 is used to perform the following operations by running the executable program code in the memory 703:
[0116] In response to an adjustment instruction of a target application, a software installation package of the target application is obtained through the communication interface 702, the adjustment instruction carries a target version identifier, the target application includes N sub-services, the software installation package includes N database file sets corresponding to the N sub-services one by one, the N database file sets are obtained from N images corresponding to the N sub-services one by one, and N is a positive integer;
[0117] According to P database file sets in the N database file sets, P subservices in the N subservices are adjusted to the versions indicated by the target version identifier, to obtain data information of the P adjusted subservices, where P is a positive integer and is less than or equal to N;
[0118] The data information of the P adjusted sub-services is stored in a database to obtain an adjusted target application program.
[0119] As an optional embodiment, the specific embodiment of the processor 701 obtaining the software installation package of the target application is:
[0120] Obtain a target image corresponding to a target subservice among the N subservices;
[0121] Creating a target container based on the target image, and extracting a database file from the target image through the target container to obtain a database file set of the target sub-service, wherein the database file set of the target sub-service includes: database files of different versions under the target sub-service, and the database files in the database file set of the target sub-service are named according to the version identifier to which the database file belongs;
[0122] A software installation package of the target application is generated according to the database file set of the target sub-service.
[0123] As an optional embodiment, the processor 701 adjusts P of the N sub-services to the version indicated by the target version identifier according to P of the N database file sets. A specific embodiment is as follows:
[0124] Determine P sub-services to be adjusted from N sub-services according to the screening rules;
[0125] Determining an adapter that matches the database file set corresponding to the target subservice according to the type of the database file in the database file set corresponding to the target subservice, wherein the target subservice is any one of the P subservices to be adjusted that are determined from the N subservices according to the screening rule;
[0126] The target sub-service is adjusted through an adapter that matches the database file set corresponding to the target sub-service to obtain adjusted data information of the target sub-service.
[0127] As an optional embodiment, each image includes at least one database file, and each database file in the at least one database file carries an identifier of a corresponding database; the processor 701 adjusts the target sub-service through an adapter that matches the database file set corresponding to the target sub-service, and a specific embodiment of obtaining the adjusted data information of the target sub-service is:
[0128] Determine a version identification interval according to the current version identification of the target subservice and the target version identification;
[0129] Call an adapter that matches the database file set corresponding to the target sub-service, execute at least one database file in the database file set corresponding to the target sub-service, and obtain the adjusted data information of the target sub-service, wherein the version identifier of the at least one database file belongs to the version identifier interval.
[0130] As an optional embodiment, the database file set corresponding to the target sub-service includes multiple database files belonging to the version identification interval; the processor 701 calls an adapter matching the database file set corresponding to the target sub-service, executes at least one database file in the database file set corresponding to the target sub-service, and obtains the specific embodiment of the adjusted data information of the target sub-service is:
[0131] Calling an adapter that matches the database file set corresponding to the target sub-service, and sequentially executing the database files in the database file set corresponding to the target sub-service that belong to the version identification interval in a target order, to obtain adjusted data information of the target sub-service;
[0132] The target order is determined according to an adjustment policy of the target sub-service, and the adjustment policy of the target sub-service is determined according to a current version identifier of the target sub-service and the target version identifier.
[0133] As an optional embodiment, the identifier of each database file carries an adjustment type field; the processor 701 calls the adapter that matches the database file set corresponding to the target sub-service, executes at least one database file in the database file set corresponding to the target sub-service, and obtains the specific embodiment of the adjusted data information of the target sub-service is:
[0134] Determining an adjustment strategy according to the current version identifier of the target subservice and the target version identifier;
[0135] Filtering out a to-be-executed database file from a database file set corresponding to the target sub-service by using the adjustment strategy, wherein the adjustment type field of the to-be-executed database file matches the adjustment strategy;
[0136] An adapter matching the database file set corresponding to the target sub-service is called to execute the database file to be executed, and to obtain the adjusted data information of the target sub-service.
[0137] As an optional embodiment, in the P sub-services, the data information of each sub-service carries a current version identifier; the processor 701 adjusts the P sub-services in the N sub-services to the version indicated by the target version identifier according to the P database file sets in the N database file sets, and obtains the data information of the P adjusted sub-services. A specific embodiment is:
[0138] In response to the P sub-services being adjusted successfully;
[0139] The current version identifiers of the P sub-services are replaced with the target version identifiers to obtain data information of the P adjusted sub-services.
[0140] As an optional embodiment, the N sub-services belong to M service types, M is a positive integer, and M is less than or equal to N; the software installation package of the target application is obtained by classifying and packaging the N database file sets according to the M service types.
[0141] Based on the same inventive concept, the principles and beneficial effects of solving the problems by the smart device provided in the embodiments of the present application are similar to the principles and beneficial effects of solving the problems by the data processing method for the application in the method embodiments of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.
[0142] An embodiment of the present application also provides a computer-readable storage medium, in which one or more instructions are stored. The one or more instructions are suitable for being loaded by a processor and executing the data processing method for an application described in the above method embodiment.
[0143] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the data processing method for an application program described in the above method embodiment.
[0144] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the above-mentioned method for processing data of the application program.
[0145] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0146] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0147] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the readable storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0148] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present application are still within the scope of the invention.
Claims
1. A method for processing data of an application, characterized in that: include: In response to an adjustment instruction of a target application, a software installation package of the target application is obtained, the adjustment instruction carries a target version identifier, the target application includes N sub-services, the software installation package includes N database file sets corresponding to the N sub-services one by one, the N database file sets are obtained from N images corresponding to the N sub-services one by one, and N is a positive integer; According to P database file sets in the N database file sets, P subservices in the N subservices are adjusted to the versions indicated by the target version identifier, to obtain data information of the P adjusted subservices, where P is a positive integer and is less than or equal to N; The data information of the P adjusted sub-services is stored in a database to obtain an adjusted target application program.
2. The method according to claim 1, characterized in that The step of obtaining the software installation package of the target application comprises: Obtain a target image corresponding to a target subservice among the N subservices; Creating a target container based on the target image, and extracting a database file from the target image through the target container to obtain a database file set of the target sub-service, wherein the database file set of the target sub-service includes: database files of different versions under the target sub-service, and the database files in the database file set of the target sub-service are named according to the version identifier to which the database file belongs; A software installation package of the target application is generated according to the database file set of the target sub-service.
3. The method according to claim 1, characterized in that The adjusting, according to P database file sets in the N database file sets, P sub-services in the N sub-services to the versions indicated by the target version identifiers includes: Determine P sub-services to be adjusted from N sub-services according to the screening rules; Determining an adapter that matches the database file set corresponding to the target subservice according to the type of the database file in the database file set corresponding to the target subservice, wherein the target subservice is any one of the P subservices to be adjusted that are determined from the N subservices according to the screening rule; The target sub-service is adjusted through an adapter that matches the database file set corresponding to the target sub-service to obtain adjusted data information of the target sub-service.
4. The method according to claim 3, characterized in that Each image includes at least one database file, and each database file in the at least one database file carries an identifier of a corresponding database; the target sub-service is adjusted by an adapter that matches the database file set corresponding to the target sub-service to obtain data information of the adjusted target sub-service, including: Determine a version identification interval according to the current version identification of the target subservice and the target version identification; Call an adapter that matches the database file set corresponding to the target sub-service, execute at least one database file in the database file set corresponding to the target sub-service, and obtain the adjusted data information of the target sub-service, wherein the version identifier of the at least one database file belongs to the version identifier interval.
5. The method according to claim 4, characterized in that The database file set corresponding to the target sub-service includes a plurality of database files belonging to the version identification interval; the calling of an adapter matching the database file set corresponding to the target sub-service, executing at least one database file in the database file set corresponding to the target sub-service, and obtaining the adjusted data information of the target sub-service includes: Calling an adapter that matches the database file set corresponding to the target sub-service, and sequentially executing the database files in the database file set corresponding to the target sub-service that belong to the version identification interval in a target order, to obtain adjusted data information of the target sub-service; The target order is determined according to an adjustment policy of the target sub-service, and the adjustment policy of the target sub-service is determined according to a current version identifier of the target sub-service and the target version identifier.
6. The method according to claim 4, characterized in that The identifier of each database file carries an adjustment type field; the calling of an adapter matching the database file set corresponding to the target sub-service, executing at least one database file in the database file set corresponding to the target sub-service, and obtaining the adjusted data information of the target sub-service includes: Determining an adjustment strategy according to the current version identifier of the target subservice and the target version identifier; Filtering out a to-be-executed database file from a database file set corresponding to the target sub-service by using the adjustment strategy, wherein the adjustment type field of the to-be-executed database file matches the adjustment strategy; An adapter matching the database file set corresponding to the target sub-service is called to execute the database file to be executed, and to obtain the adjusted data information of the target sub-service.
7. The method according to claim 1, characterized in that The data information of each of the P subservices carries a current version identifier; the step of adjusting the P subservices in the N subservices to the versions indicated by the target version identifier according to the P database file sets in the N database file sets to obtain the data information of the P adjusted subservices includes: In response to the P sub-services being adjusted successfully; The current version identifiers of the P sub-services are replaced with the target version identifiers to obtain data information of the P adjusted sub-services.
8. The method according to claim 1, characterized in that The N sub-services belong to M service types, where M is a positive integer and is less than or equal to N; the software installation package of the target application is obtained by classifying and packaging the N database file sets according to the M service types.
9. A data processing device for an application, characterized in that: include: an acquisition unit, configured to acquire a software installation package of the target application in response to an adjustment instruction of the target application, the adjustment instruction carrying a target version identifier, the target application including N sub-services, the software installation package including N database file sets corresponding one-to-one to the N sub-services, the N database file sets being acquired from N images corresponding one-to-one to the N sub-services, where N is a positive integer; a processing unit, configured to adjust P of the N sub-services to the versions indicated by the target version identifier according to P of the N database file sets, and obtain data information of the P adjusted sub-services, where P is a positive integer and is less than or equal to N; And used to store the data information of the P adjusted sub-services in a database to obtain the adjusted target application.
10. A smart device, characterized in that: include: storage devices and processors; The storage device stores a computer program; The processor executes a computer program to implement the data processing method for an application program as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the method for processing data of an application program according to any one of claims 1 to 8 is implemented.
