CN110704039B - Configuration data processing method and device in application development process - Google Patents

Configuration data processing method and device in application development process Download PDF

Info

Publication number
CN110704039B
CN110704039B CN201910940205.0A CN201910940205A CN110704039B CN 110704039 B CN110704039 B CN 110704039B CN 201910940205 A CN201910940205 A CN 201910940205A CN 110704039 B CN110704039 B CN 110704039B
Authority
CN
China
Prior art keywords
code
configuration
data
configuration data
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910940205.0A
Other languages
Chinese (zh)
Other versions
CN110704039A (en
Inventor
李兰辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201910940205.0A priority Critical patent/CN110704039B/en
Publication of CN110704039A publication Critical patent/CN110704039A/en
Application granted granted Critical
Publication of CN110704039B publication Critical patent/CN110704039B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Abstract

The present specification discloses a method and an apparatus for processing configuration data in an application development process, wherein a test machine may receive configuration data issued by a server, then generate a code for analyzing the configuration field according to an analysis code generation rule corresponding to the configuration field, which is obtained from the server in advance, for each configuration field in the received configuration data, then update an analysis component stored in the test machine for analyzing the configuration data according to the generated code, and finally analyze the received configuration data by using the updated analysis component, and update the configuration of the application according to the analyzed configuration data. And analysis codes do not need to be manually written, so that the probability of conflict among configuration data is reduced, and the efficiency of application development is improved.

Description

Configuration data processing method and device in application development process
Technical Field
The present application relates to the field of logistics distribution technologies, and in particular, to a method and an apparatus for processing configuration data in an application development process.
Background
At present, application development not only relates to the development of service codes, but also relates to the development of configuration data analysis codes issued by a server, and developers at two sides of the application and the server need to communicate and coordinate. The configuration data sent by the server to the Application is usually sent to an Application Programming Interface (API) that receives the configuration data in a unified manner in the Application.
In general, a code development process that involves how configuration data is parsed includes: communication and writing.
Firstly, a developer who needs an application communicates with a developer of a server to determine the content of configuration data needed by an appointment, such as: which configuration fields are required, the key (i.e., key) of each configuration field, the value (i.e., value) of the configuration field, the value type (e.g., integer, long integer, etc.) of the configuration field, default values of the configuration field, and so on.
Thereafter, the server and the application developer perform the relevant code development, respectively. For server-side development, the configuration data transmitted to the application through the API can be written according to conventions. Typically the configuration data is data in the form of key-value pairs written in json format. For the development of the application side, the development content comprises: a JavaBean for parsing configuration data is written to parse data in the form of key-value pairs into data that an application can call.
However, as applications become more complex, multiple teams or multiple engineers often develop the applications to develop different business functions. Configuration data related to development of different development teams are generally communicated with server developers respectively, so that each team needs to develop codes respectively and maintain JavaBean for analyzing the configuration data together. Updates to the javabeans are required whenever the configuration data changes. When some configuration fields are not used any more, if communication is not timely, related codes in the JavaBean are not deleted timely, and the JavaBean is overstaffed.
Therefore, the problems that the communication cost is high, the codes are easy to be overstaffed, and developers need to repeatedly work exist in the conventional code development related to configuration data, so that the developers cannot concentrate on business development.
Disclosure of Invention
The embodiment of the specification provides a method and a device for processing configuration data in an application development process, which are used for partially solving the problems in the prior art.
The embodiment of the specification adopts the following technical scheme:
the method for processing configuration data in the application development process provided by the specification comprises the following steps:
each testing machine respectively receives configuration data issued by the server through the same Application Programming Interface (API);
generating a code for analyzing the configuration field according to an analysis code generation rule which is obtained from the server in advance and corresponds to the configuration field for each configuration field contained in the configuration data received by the tester;
each testing machine respectively updates the analysis components which are respectively stored and used for analyzing the configuration data according to the generated codes;
and analyzing the configuration data by adopting the updated analysis component, and updating the configuration of the application according to the analyzed configuration data.
Optionally, the data structure of the configuration data is a tree structure, and the data types included in the same layer of nodes at least include: at least one of a standard data type, a business-customized data type, and a nested data type of a programming language.
Optionally, generating a code for analyzing the configuration field according to an analysis code generation rule corresponding to the configuration field, which is obtained from the server in advance, specifically includes:
determining a key of the configuration field;
searching an analysis code generation rule corresponding to the key of the configuration field in a data definition file acquired from the server in advance;
and generating a code for analyzing the configuration field through an annotation processor APT according to the searched analysis code generation rule.
Optionally, the method further comprises:
and when the analysis rule does not contain the key in the configuration field, determining that the configuration data is abandoned, and not generating a code for analyzing the configuration field.
Optionally, the method further comprises:
generating a general code corresponding to the readable data obtained after the configuration field is analyzed according to the annotation in the service code, wherein the general code is at least used for realizing that: at least one of local caching, cross-process synchronization, data subscription notification.
Optionally, according to the comment in the service code, generating a general code corresponding to the readable data obtained after the configuration field is parsed, which specifically includes:
determining data analyzed by the configuration field as target data;
generating a code for calling a code development tool through an annotation processor APT according to an annotation corresponding to a code for processing the target data in the business code, wherein the code development tool is used for developing a general code;
and inputting the target data into the code development tool by running a code for calling the code development tool to generate a general code corresponding to the target data.
Optionally, the method further comprises:
when the method is applied to at least two testing machines developing the same application and the development of the service codes developed on each testing machine is finished, merging the codes according to the self-updated analysis component and the updated analysis components in other testing machines;
and packaging the merged codes, and determining an analysis component which is jointly developed by all the testing machines and used for analyzing the configuration data by the application.
The method for processing configuration data in the application development process provided by the specification comprises the following steps:
the receiving module is configured to receive configuration data sent by a server through an Application Programming Interface (API);
a generating module configured to generate, for each configuration field included in the received configuration data, a code for analyzing the configuration field according to an analysis code generation rule corresponding to the configuration field, which is acquired from the server in advance;
the updating module is configured to update the saved analysis component for analyzing the configuration data according to the generated code;
and the processing module is configured to analyze the configuration data by using the updated analysis component and update the configuration of the application according to the analyzed configuration data.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the configuration data processing method in the application development process described above.
The electronic device provided by the present specification includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the processor implements the configuration data processing method in the application development process.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
when an application is developed on a testing machine, the testing machine can receive configuration data issued by a server through an API (application programming interface), then generate codes for analyzing the configuration fields according to analysis code generation rules which are obtained from the server in advance and correspond to the configuration fields aiming at each configuration field in the received configuration data, then update analysis components which are stored by the testing machine and used for analyzing the configuration data according to the generated codes, finally analyze the received configuration data by adopting the updated analysis components, and update the configuration of the application according to the analyzed configuration data. In the application development stage, the testing machine can generate codes for analyzing the configuration fields according to the analysis code generation rules acquired from the server in advance, and does not need to manually write the analysis codes, so that the testing machine can automatically generate the codes required by analyzing the configuration data without the participation of developers, and update the analysis components. Because the configuration data and the analysis code generation rule are only provided by the server side, the probability of conflict between the configuration data is reduced, and the problem of repeated labor of application developers is avoided, so that the workers can concentrate on service development, and the efficiency of application development is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram illustrating a configuration data processing flow in an application development process according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a server issuing configuration data to each tester through the same API, according to the present disclosure;
FIG. 3 is a schematic diagram of a data structure for configuration data provided herein;
FIG. 4 is a schematic diagram of parsing component consolidation provided herein;
fig. 5 is a schematic structural diagram of a configuration data processing apparatus in an application development process according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device for implementing a configuration data processing method in an application development process provided in this specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more apparent, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step are within the scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a configuration data processing process in an application development process provided in an embodiment of the present specification, which may specifically include one or more of the following steps:
s100: the test machine receives configuration data sent by the server through an Application Programming Interface (API).
In this specification, the configuration data processing process is a process of generating a code for processing configuration data in an application development process, processing the configuration data according to the generated code, and determining the configuration of an application. In addition, because the current application development mode usually develops different services in the application for different teams, and the different teams run the developed codes on different testers during development to test whether the developed codes are usable, the configuration data processing method provided by the present specification can be applied to at least two testers developing the same application. For convenience of description, a test machine executing the configuration data processing procedure is taken as an example in the subsequent steps of the present specification.
The test machine provides a device of a running platform for a code of a developed application, the running environment of the application is not limited in the specification, different test machines can provide different running environments, and the implementation of the method is not affected. Wherein, the operation environment can include: an iOS system, an Android (Android) system, and the like, which are not limited in this specification.
Specifically, because the process of processing the configuration data in the application development process provided in this specification, the application development involves the development of both the application and the server, and thus, for each tester in the application development process, the tester may receive the configuration data issued by the server through the API. The server is a server that provides support for application development, for example, after a server developer completes development, the server sends service data or configuration data to each tester, so that the application developer can perform testing on the tester according to the received data, as shown in fig. 2.
Fig. 2 is a schematic diagram of the configuration data issued by the server to each tester through the same API. The applications running on tester a and tester B in fig. 2 both receive configuration data through the first API. Moreover, because the service functions developed by different teams are different, the configuration data required by the test machine a and the test machine B are not completely the same, and the configuration data sent by the server is not completely the same. Of course, because the business functions developed by different teams are different, there may be a difference in the business codes contained by the applications running on tester a and tester B. For example, the application code run by the testing machine a includes a code developed by the development team a to implement the authentication function, and the application code run by the testing machine B includes a code developed by the development team B to implement the payment function.
S102: and generating a code for analyzing each configuration field contained in the received configuration data according to an analysis code generation rule which is acquired from the server in advance and corresponds to the configuration field.
In this specification, for each configuration field in the configuration data received by the tester, a code for analyzing the configuration field is generated based on an analysis code generation rule corresponding to the configuration field, which is acquired from the server in advance.
Because the configuration data sent by the server is usually written in a form convenient for developers to understand, the developers at the application end can determine the use of each field in the configuration data according to the configuration data sent by the server. However, since such configuration data is only a meaningless character string for an application, before determining the configuration of the application using the configuration data, the configuration data needs to be parsed by parsing the code of the configuration data to obtain configuration data that is readable by the application.
Specifically, in this specification, for any test machine that receives configuration data, the test machine may determine, for each configuration field in the configuration data, a key of the configuration field, search, in a data definition file acquired from the server in advance, an analysis code generation rule corresponding to the key of the configuration field, and generate, by an Annotation Processor (APT), a code for analyzing the configuration field according to the searched analysis code generation rule.
The data definition file is a data definition file which is compiled by a server developer according to configuration data to be issued and how to analyze, and the definition file comprises keys of each configuration field and an analysis mode of each configuration field, so that the data definition file can be regarded as a file comprising a corresponding relation between each key and each analysis mode. In addition, since the data definition file is required for data analysis, each tester may acquire the data definition file from the server in advance. Of course, there is no limitation in this specification on how the data definition file is obtained, and for example, the data definition file may be sent to the application developer by the server developer through an instant messaging application inside the developer, or may be obtained by storing the data definition file in a non-volatile memory (e.g., a usb disk) of the entity, by offline, and so on.
Therefore, the tester may generate a code for analyzing each configuration field by using the key of the configuration field as a comment and using the APT and the analysis code generation rule corresponding to the key in the data definition file.
In addition, since the configuration data includes, in terms of type: standard data types, business custom data types, and nested data types of a programming language. The standard data type of the programming language is a voice used for writing an application, and for example, when an application is written using Java voice, the standard data type of the programming language includes keys for specifying data available in Java language, such as "type", "address sensitivity gradient", "isshowningbankcard", and the like. The service custom data type is usually a standard data type of a service function developer (i.e. a developer developing a certain service in an application) in a programming language, which cannot meet the requirement, and the custom data type is convenient as long as the programming language supports the custom data type. And the nested data type is configuration data in a form that one key commonly in the configuration data comprises a plurality of key value pairs, when the configuration fields are analyzed, if the nested data type is determined, the values corresponding to the keys need to be further analyzed, and the nested configuration fields are determined and then analyzed.
For example, the configuration data of a certain terminal is:
“apiServiceConfig”:{
“callRecipientiDgrade”:“0”,
“reportDistanceThreshold”:“80”,
……
the apiServiceConfig is a key of a nested data type, and the remaining "callRecipient Dgrade": 0 "," reportDistingThreshold ": 80", … …, etc. can be regarded as values corresponding to the apiServiceConfig, and obviously, the apiServiceConfig is a configuration field and is data nested with a plurality of configuration fields. Therefore, each configuration field nested in the configuration data table, such as "callRecipientiDgrade": 0 "," reportdistentithrreshold ": 80", etc., needs to be further parsed to determine the configuration data required by the application.
Therefore, in this specification, in order to facilitate parsing of the configuration data, a data structure of the configuration data sent by the server is a tree structure, and a data type included in a node in the same layer includes at least one of a standard data type of a programming language, a service-defined data type, and a nested data type, as shown in fig. 3. Fig. 3 is a schematic diagram of a data structure of configuration data provided in the present specification.
The tester may perform parsing of the configuration fields by layers according to a tree structure, and when it is determined that a certain node is not a leaf node, determine that the configuration field of the node is data of a nested type, and perform step S102 on each configuration field in a child node of the node.
S104: and updating a self-stored analysis component for analyzing the configuration data according to the generated code.
In this specification, the tester, after generating the code for resolving each configuration field of the configuration data, may update its own saved resolving component for resolving the configuration data, which may be a JavaBean.
Since the configuration data required by different testers is not completely the same, and the configuration data issued by the server is usually different, different testers can update the analysis component by executing steps S100 to S104 according to the code generated by the configuration data received recently and the analysis code generation rule acquired recently.
Because the analysis components of the tester are all automatically generated, when a server developer changes the analysis rule of the configuration data, the tester can update the analysis components as long as receiving the configuration data through the API. Moreover, if a certain configuration field is disabled, the analysis component of the tester can be updated by issuing configuration data that does not include the disabled configuration field.
The method and the system ensure that only one end of a developer (such as a server developer) can define the configuration data and how the configuration data is analyzed, and avoid the cost of communication among a plurality of development teams. As in the prior art, when a certain configuration field is disabled, the application developer needs to locate in the parsing component in time to parse the code of the disabled configuration field and delete the determined code. In the process provided by the present specification, the tester can generate an updated parsing component by itself, only by providing the data definition file again by the server, or providing the configuration data not including the disabled configuration field.
The situation that when the configuration data of the application end and the configuration data of the server end are asynchronous, some configuration fields are already stopped, and application or server developers are unaware of the configuration fields, the analytic component is gradually bloated is reduced. Moreover, because the tester can generate and update the analysis component by itself, the situation that developers dare not to modify the analysis component easily and are afraid of causing problems of other services in the prior art is avoided.
In step S102, for each configuration field, when the parsing rule does not include the key in the configuration field, it is determined that the configuration data is discarded, and no code for parsing the configuration field is generated.
S106: and analyzing the configuration data by adopting the updated analysis component, and updating the configuration of the application according to the analyzed configuration data.
In this specification, when the tester updates the analysis component, the configuration data may be analyzed, and the configuration of the application may be updated according to the analyzed configuration data. Since the configuration data provided by the server is used for supporting the business execution of the application, in addition to updating the parsing component, the tester may determine the parsed configuration data according to the updated parsing component and the configuration data to update the configuration of the application.
Based on the configuration data processing process in the application development process shown in fig. 1, the tester may receive configuration data issued by the server through the same API, then generate a code for analyzing the configuration field according to an analysis code generation rule corresponding to the configuration field, which is obtained from the server in advance, for each configuration field in the received configuration data, then each tester may update an analysis component for analyzing the configuration data, which is stored in each tester, according to the generated code, and finally analyze the received configuration data by using the updated analysis component, and update the configuration of the application according to the analyzed configuration data. In the application development stage of any testing machine in the process, codes for analyzing the configuration fields can be generated for each configuration field in the configuration data sent by the server according to the analysis code generation rule obtained from the server in advance, and manual compiling of the analysis codes is not needed, so that the testing machine can automatically generate the codes required for analyzing the configuration data under the condition that developers do not participate, and the analysis components are updated. Because the configuration data and the analysis code generation rule are only provided by the server side, the probability of conflict between the configuration data is reduced, and meanwhile, the problem of repeated labor of application developers is avoided, so that the workers can concentrate on service development, and the efficiency of application development is improved.
In addition, in the application development at present, besides writing and analyzing the codes of the configuration data, developers need to write and analyze callable data for each configuration field of the configuration data, and then code such as local cache, cross-process synchronization, data subscription notification, and the like.
When a plurality of business teams develop different business functions of the same application, codes such as local cache, cross-process synchronization, data subscription and notification and the like need to be written for each configuration field in configuration data. Since these codes are typically written for each configuration field at application development time, this specification refers to such codes as generic codes. For example, when the configuration field needs to be stored locally as a cache, a corresponding code for determining a storage address and a code for storing the configuration field in the storage address, that is, a local cache code, are required. When the configuration field may need to be synchronized across multiple processes, then code is needed to synchronize the configuration field across the processes. When the configuration of the application relates to the service logic of a plurality of services, other services need to configure the related subscription codes to determine the notification of the change of the configuration, and the configuration also needs the corresponding notification codes to send the change notification to each subscribed service when the configuration is changed.
In this specification, for each tester, the tester may further generate a general code corresponding to the readable data obtained by parsing the configuration field according to the comment in the service code. Wherein the generic code is at least to implement: at least one of local caching, cross-process synchronization, data subscription notification.
Specifically, the tester determines, for each configuration field, data obtained by analyzing the configuration field as target data. And then generating a code for calling a code development tool through the APT according to the annotation corresponding to the code for processing the target data in the business code, wherein the code development tool is used for developing a general code. And finally, inputting the target data into the code development tool by running a code for calling the code development tool, and generating a general code corresponding to the target data.
Because the current general codes all have corresponding code development tools, for example, the current common code development tools SP, ContentProvider, and the like, local cache codes can be provided, jsoffile SP, MMKV, and the like provide cross-process codes, and Rx, broadcast, AIDL, and the like provide data subscription notification codes. Therefore, codes calling a code development tool can be written through the APT, and required universal codes are generated through the called code development tool. The problem of code conflict during application development caused by different users due to different familiar code development tools can be avoided.
Further, in the present specification, when the development of the service code developed in each tester is completed, the code is merged based on the updated analysis component in each tester, the merged code is packaged, and the analysis component for analyzing the configuration data of the application developed in each tester is determined, as shown in fig. 4.
In fig. 4, it can be seen that two javabeans are written in the development teams M and N, respectively, and after code merging and encapsulation are performed, the javabeans used for analyzing configuration data in the APP are generated.
And for the written universal codes, each tester can package the universal codes to generate service components and call the service components on a service level. I.e. can be used as a component within a service for being invoked by service code without sinking to the underlying component library.
Further, if the applications developed by the different testers receive the configuration data through different APIs, the finally developed applications also receive the configuration data through different APIs, and the configuration data obtained by each service function through different APIs is only used for supporting the execution of the service, so that there is no conflict between the configuration data and the components for analyzing the configuration data. The methods provided herein are therefore applicable to application development processes that receive configuration data through the same API. Of course, since the complexity of the application is greatly increased by setting a plurality of APIs to receive different configuration data, the application usually receives the configuration data through one API.
Corresponding to the configuration data processing procedure in the application development procedure shown in fig. 1, the embodiment of this specification further provides a schematic structural diagram of a configuration data processing apparatus in the application development procedure, as shown in fig. 5.
Fig. 5 is a schematic structural diagram of a configuration data processing apparatus in an application development process according to an embodiment of the present specification, where the apparatus includes:
a receiving module 200 configured to receive configuration data sent by a server through an application programming interface API;
a generating module 202, configured to generate, for each configuration field included in the received configuration data, a code for analyzing the configuration field according to an analysis code generating rule corresponding to the configuration field and acquired from the server in advance;
an update module 204 configured to update the saved parsing component for parsing the configuration data according to the generated code;
a processing module 206 configured to parse the configuration data using the updated parsing component and update the configuration of the application according to the parsed configuration data.
Optionally, the data structure of the configuration data is a tree structure, and the data types included in the same layer of nodes at least include: at least one of a standard data type, a business-customized data type, and a nested data type of a programming language.
Optionally, the generating module 202 is configured to determine a key of the configuration field, search for an analysis code generation rule corresponding to the key of the configuration field in a data definition file acquired from the server in advance, and generate a code for analyzing the configuration field through the annotation processor APT according to the searched analysis code generation rule.
Optionally, the generating module 202 is configured to determine that the configuration data is obsolete and not generate a code for parsing the configuration field when the parsing rule does not include the key in the configuration field.
Optionally, the generating module 202 is configured to generate a universal code corresponding to the readable data obtained by parsing the configuration field according to the annotation in the service code, where the universal code is at least used to implement: at least one of local caching, cross-process synchronization, data subscription notification.
Optionally, the generating module 202 is configured to determine data obtained after the configuration field is parsed, use the data as target data, generate, by the annotation processor APT, a code for calling a code development tool according to an annotation corresponding to a code for processing the target data in a business code, where the code development tool is used to develop a general code, and generate, by running the code for calling the code development tool, the general code corresponding to the target data by inputting the target data into the code development tool.
Optionally, the apparatus further comprises:
and the encapsulating module 208 is configured to, when the development of the service codes developed on each test machine is completed, merge the codes according to the updated analysis components in each test machine, encapsulate the merged codes, and determine the analysis components used by the application developed by each test machine to analyze the configuration data.
Based on the configuration data processing apparatus in the application development process shown in fig. 5, a tester may receive configuration data issued by a server through the same API, then generate a code for analyzing the configuration field according to an analysis code generation rule corresponding to the configuration field, which is obtained from the server in advance, for each configuration field in the received configuration data, then each tester may update an analysis component for analyzing the configuration data, which is stored in the tester, according to the generated code, and finally analyze the received configuration data by using the updated analysis component, and update the configuration of the application according to the analyzed configuration data. In the application development stage of any testing machine in the process, codes for analyzing the configuration fields can be generated for each configuration field in the configuration data sent by the server according to the analysis code generation rule obtained from the server in advance, and manual compiling of the analysis codes is not needed, so that the testing machine can automatically generate the codes required for analyzing the configuration data under the condition that developers do not participate, and the analysis components are updated. Because the configuration data and the analysis code generation rule are only provided by the server side, the probability of conflict between the configuration data is reduced, and meanwhile, the problem of repeated labor of application developers is avoided, so that the workers can concentrate on service development, and the efficiency of application development is improved.
The present specification also provides a computer-readable storage medium storing a computer program, where the computer program is operable to execute any one of the above configuration data processing methods in an application development process. The computer readable storage medium may be located in a tester for application development, so that the tester runs the computer program stored in the computer readable storage medium, updates an analysis component for analyzing the configuration data after receiving the configuration data sent by the server through the API, and updates the configuration of the application developed in the tester with the analyzed configuration data.
Based on the method for processing configuration data in the application development process shown in fig. 1, an embodiment of this specification further provides a schematic structural diagram of the electronic device shown in fig. 6. As shown in fig. 6, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the configuration data processing method in any one of the application development processes.
Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A method for processing configuration data in an application development process is characterized by comprising the following steps:
the test machine receives configuration data sent by a server through an Application Programming Interface (API);
generating a code for analyzing each configuration field contained in the received configuration data according to an analysis code generation rule which is obtained from the server in advance and corresponds to the configuration field;
updating an analysis component which is stored by the self and used for analyzing the configuration data according to the generated code;
and analyzing the configuration data by adopting the updated analysis component, and updating the configuration of the application according to the analyzed configuration data.
2. The method of claim 1, wherein the data structure of the configuration data is a tree structure, and the data types included in the nodes in the same layer at least include: at least one of a standard data type, a business-customized data type, and a nested data type of a programming language.
3. The method according to claim 1, wherein generating a code for parsing the configuration field according to a parsing code generation rule corresponding to the configuration field, which is obtained from the server in advance, specifically includes:
determining a key of the configuration field;
searching an analysis code generation rule corresponding to the key of the configuration field in a data definition file acquired from the server in advance;
and generating a code for analyzing the configuration field through an annotation processor APT according to the searched analysis code generation rule.
4. The method of claim 1, wherein the method further comprises:
and when the analysis code generation rule does not contain the key in the configuration field, determining that the configuration data is abandoned, and not generating a code for analyzing the configuration field.
5. The method of claim 1, wherein the method further comprises:
generating a general code corresponding to readable data obtained after the configuration field is analyzed according to the annotation in the service code, wherein the general code is at least used for realizing that: at least one of local caching, cross-process synchronization, data subscription notification.
6. The method according to claim 5, wherein generating a generic code corresponding to the readable data obtained by parsing the configuration field according to the annotation in the service code specifically includes:
determining data after the configuration field is analyzed as target data;
generating a code for calling a code development tool through an annotation processor APT according to an annotation corresponding to a code for processing the target data in the business code, wherein the code development tool is used for developing a general code;
and inputting the target data into the code development tool by running a code for calling the code development tool to generate a general code corresponding to the target data.
7. The method of claim 1, wherein the method further comprises:
when the method is applied to at least two testing machines developing the same application and the development of the service codes developed on each testing machine is finished, merging the codes according to the self-updated analysis component and the updated analysis components in other testing machines;
and packaging the merged codes, and determining an analysis component which is jointly developed by all the testing machines and used for analyzing the configuration data by the application.
8. A device for processing configuration data during application development, comprising:
the receiving module is configured to receive configuration data sent by a server through an Application Programming Interface (API);
a generating module configured to generate, for each configuration field included in the received configuration data, a code for analyzing the configuration field according to an analysis code generation rule corresponding to the configuration field, which is acquired from the server in advance;
the updating module is configured to update the saved analysis component for analyzing the configuration data according to the generated code;
and the processing module is configured to analyze the configuration data by using the updated analysis component and update the configuration of the application according to the analyzed configuration data.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of claims 1-7 when executing the program.
CN201910940205.0A 2019-09-30 2019-09-30 Configuration data processing method and device in application development process Active CN110704039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910940205.0A CN110704039B (en) 2019-09-30 2019-09-30 Configuration data processing method and device in application development process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910940205.0A CN110704039B (en) 2019-09-30 2019-09-30 Configuration data processing method and device in application development process

Publications (2)

Publication Number Publication Date
CN110704039A CN110704039A (en) 2020-01-17
CN110704039B true CN110704039B (en) 2020-12-01

Family

ID=69197385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910940205.0A Active CN110704039B (en) 2019-09-30 2019-09-30 Configuration data processing method and device in application development process

Country Status (1)

Country Link
CN (1) CN110704039B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070061814A1 (en) * 2005-09-13 2007-03-15 Choi Andrew C Method and apparatus for transparently interfacing a computer peripheral with a messaging system
WO2010141922A1 (en) * 2009-06-04 2010-12-09 Abbott Diabetes Care Inc. Method and system for updating a medical device
CN101706716B (en) * 2009-09-08 2013-04-03 南京师范大学 VO-based form customization, configuration and parsing operation method
CN104090780A (en) * 2014-07-31 2014-10-08 广州视源电子科技股份有限公司 Automatic configuration method and cloud compiling system
CN106610853A (en) * 2015-10-26 2017-05-03 阿里巴巴集团控股有限公司 Application deployment method and device
US10169035B1 (en) * 2017-09-06 2019-01-01 International Business Machines Corporation Customized static source code analysis
CN107741904A (en) * 2017-09-14 2018-02-27 平安科技(深圳)有限公司 Test machine method of automatic configuration, device, equipment and storage medium
CN108415742A (en) * 2018-01-26 2018-08-17 上海电气分布式能源科技有限公司 Modular interface configuration method and device in distributed energy management system
CN109542418B (en) * 2018-11-20 2022-04-05 北京千丁互联科技有限公司 Service code generation method and computer terminal
CN110187872A (en) * 2019-05-30 2019-08-30 浪潮商用机器有限公司 A kind of BIOS development approach, system and electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110704039A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN109597661B (en) Service function configuration method and device
CN107545030B (en) Method, device and equipment for processing data blood relationship
CN107562467B (en) Page rendering method, device and equipment
CN108418851B (en) Policy issuing system, method, device and equipment
CN107038041B (en) Data processing method, error code dynamic compatibility method, device and system
CN107562777B (en) Data processing method and apparatus thereof
CN107391101B (en) Information processing method and device
CN112597013A (en) Online development and debugging method and device
CN107479868B (en) Interface loading method, device and equipment
CN111796821A (en) Page updating method and device
US11537367B1 (en) Source code conversion from application program interface to policy document
CN112162915A (en) Test data generation method, device, equipment and storage medium
CN114547024A (en) SQL statement risk detection method, device, equipment and medium
CN108170430B (en) Interface display method and system
CN114168114A (en) Operator registration method, device and equipment
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
CN111273965B (en) Container application starting method, system and device and electronic equipment
CN110704039B (en) Configuration data processing method and device in application development process
CN110022351B (en) Service request processing method and device
CN110874322B (en) Test method and test server for application program
CN115934161A (en) Code change influence analysis method, device and equipment
CN116610568A (en) Method, device, equipment and medium for identifying dependency relationship of codes
CN107665124B (en) Modular JavaScript file processing method, device and server
CN115167822A (en) Branch code merging method, device, equipment and storage medium

Legal Events

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