CN111752601A - Data configuration method, device and system, electronic equipment and storage medium thereof - Google Patents

Data configuration method, device and system, electronic equipment and storage medium thereof Download PDF

Info

Publication number
CN111752601A
CN111752601A CN202010563027.7A CN202010563027A CN111752601A CN 111752601 A CN111752601 A CN 111752601A CN 202010563027 A CN202010563027 A CN 202010563027A CN 111752601 A CN111752601 A CN 111752601A
Authority
CN
China
Prior art keywords
data
configuration
path
annotation
target path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010563027.7A
Other languages
Chinese (zh)
Inventor
贾佃霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beike Technology Co Ltd
Original Assignee
Beike 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 Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN202010563027.7A priority Critical patent/CN111752601A/en
Publication of CN111752601A publication Critical patent/CN111752601A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Library & Information Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a data configuration method, a device, a system, electronic equipment and a storage medium thereof, wherein the method also comprises the steps of receiving a self-defined scanning path and an annotation, wherein the scanning path is a data source path indicating to store data to be configured, and the annotation is a mark of data to be called in the data to be configured; acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called; and storing the target path in a preset configuration center for subsequent configuration. The target path of the data to be called is obtained through the scanning path and the annotation, and the target path is configured in a user-defined mode, so that the research and development process of data configuration is greatly reduced, the efficiency is improved, and the technical problems of long research and development period, low efficiency and high cost caused by the fact that research and development personnel need to continuously research and develop corresponding data configuration due to business change and increase are solved.

Description

Data configuration method, device and system, electronic equipment and storage medium thereof
Technical Field
The present invention relates to the field of computers, and in particular, to a data configuration method, apparatus, system, electronic device, and storage medium thereof.
Background
At present, data configuration of a system is a specific method that research and development personnel need to frequently perform bottom layer development according to specific situations, but the development mode is low in efficiency and high in cost. For example, in a house rental transaction system, as business requirements change continuously, research and development personnel need to perform repeated data configuration research and development continuously on the bottom layer, which is not only high in cost, but also long in time period. In addition, business personnel and research and development personnel need to communicate in a large quantity to convert business requirements into corresponding data configuration.
Therefore, the inventor finds that in the prior art, at least the following problems exist, and research and development personnel need to continuously research and develop corresponding data configuration due to business change and increase, so that the technical problems of long research and development period, low efficiency and high cost are caused.
Disclosure of Invention
The application provides a data configuration method, and aims to provide a data configuration method which can be customized, simplify the development process of data configuration, shorten the research and development period of data configuration, improve the efficiency and reduce the cost by efficiently acquiring a data source.
The method comprises the following steps:
receiving a self-defined annotation and a scanning path, wherein the scanning path is a data source path indicating data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured;
acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called;
storing the target path in the configuration center for subsequent configuration.
Optionally, the annotation further includes a method rule, and the method rule is used for obtaining a rule method of the data to be called from the data to be configured through the method rule.
Optionally, after the step of obtaining the target path under the scanning path according to the annotation, where the target path is a path corresponding to the data to be called, the method further includes:
serializing the target path in a steam flow mode to obtain storage data;
the storing the target path in the configuration center for subsequent configuration is to store the stored data in the configuration center for subsequent configuration.
Optionally, the receiving a customized annotation and a scan path, where the scan path is a data source path indicating that data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured, and the tag includes:
receiving a self-defined annotation and a scanning path and an authentication identifier, wherein the scanning path is a data source path indicating data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured;
the storing the target path in the preset configuration center for subsequent configuration comprises:
and the configuration center judges whether the authentication mark has a storage authority or not according to the authentication mark, and if the authentication mark has the storage authority, the target path is stored in the preset configuration center for subsequent configuration.
Optionally, storing the target path in the configuration center for subsequent configuration includes:
the configuration center judges whether a data node corresponding to the target path exists or not, wherein the data node is a corresponding data node in a pre-built data structure of the configuration center;
if the corresponding data node exists, updating data in the data node according to the target path so that the target path is stored in the data node;
and if the corresponding data node does not exist, creating the data node and storing the target path in the configuration center.
Optionally, the receiving a customized annotation and a scan path, where the scan path is a data source path indicating that data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured, and the tag includes:
receiving a self-defined scanning path, an annotation and a verification rule, wherein the scanning path is a data source path indicating data to be configured is stored, the annotation comprises a mark of data to be called in the data to be configured, and the verification rule is a configuration rule of the data to be called;
and storing the target path in a preset configuration center for subsequent configuration, and storing the target path and the check rule in the configuration center for subsequent configuration.
The application provides a data configuration system, which comprises a user-defined end and a configuration processing unit with a configuration center;
the user-defined end is used for defining a scanning path and an annotation through a preset operation; and sending the annotation and the scan path to the configuration processing unit;
the configuration processing unit is used for receiving the customized scanning path and the annotation, wherein the scanning path is a data source path indicating data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured; acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called; and storing the target path in the configuration center.
Optionally, the configuration processing unit is further configured to serialize the storage data in a steam stream manner, and store the serialized storage data in the configuration center for subsequent configuration.
Optionally, the configuration processing unit is further configured to receive a self-defined annotation and a scan path, and an authentication identifier, where the scan path is a data source path indicating that data to be configured is stored, and the annotation is a tag of data to be called in the data to be configured; and the configuration center judges whether the authentication mark has a storage authority or not according to the authentication mark, and if the authentication mark has the storage authority, the target path is stored in the configuration center for subsequent configuration.
Optionally, the configuration center determines whether a data node for storing the target path corresponds to exists, and if the data node exists, the configuration center updates data in the data node according to the target path so that the target path is stored in the data node;
and if the corresponding data node does not exist, creating the data node and storing the target path in the configuration center.
Optionally, the configuration processing unit is further configured to receive a self-defined annotation and a scan path, and a check rule, where the scan path is a data source path indicating to store data to be configured, the annotation is a tag of data to be called in the data to be configured, and the check rule is a configuration rule for the data to be called; and storing the target path and the check rule in the configuration center for subsequent configuration.
The application also provides a data configuration system, which comprises a user-defined end, an SDK end with a configuration center and a configuration system;
the user-defined end obtains a scanning path and an annotation, a check rule and an authentication identifier through preset operation, and sends the scanning path, the annotation, the check rule and the authentication identifier to the SDK end;
the SDK end is used for receiving the scanning path and the annotation, the check rule and the authentication identifier, wherein the scanning path is a data source path indicating data to be configured to be stored, and the annotation comprises a mark of data to be called in the data to be configured;
acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called;
serializing the target path and the check rule in a steam flow mode to obtain stored data;
sending the stored data to the configuration center;
the configuration center judges whether the authentication mark has a storage authority or not according to the authentication mark, if the authentication mark has the storage authority, the configuration center judges whether a corresponding data node for storing the storage data exists or not, and if the corresponding data node exists, the configuration center updates and stores the data node according to the target path and the check rule; if the corresponding data node does not exist, creating the data node and storing the storage data in the data node;
and sending the SDK end to the configuration system so that the configuration system performs data configuration through the SDK end.
The application provides a data configuration device, the device includes:
the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a self-defined annotation and a scanning path, the scanning path is a data source path indicating data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured;
the acquisition module is used for acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called;
and the storage module is used for storing the target path in the preset configuration center for subsequent configuration.
Optionally, the apparatus further comprises:
the serialization module is used for carrying out serialization processing on the target path to obtain storage data;
the storage module is further configured to store the storage data in the configuration center for subsequent configuration.
Optionally, the receiving module is configured to receive a self-defined annotation and a scan path, and an authentication identifier, where the scan path is a data source path indicating that data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured;
the device also includes: an authentication module;
the authentication module is also used for the configuration center to judge whether the storage authority is provided according to the authentication identifier,
and if the authentication identification has storage authority, storing the target path in a preset configuration center for subsequent configuration.
Optionally, the determining module is further configured to determine, by the configuration center, whether a data node for storing the target path exists, where the data node is a corresponding data node in a pre-established data structure of the configuration center;
if the corresponding data node exists, updating data in the data node according to the target path so that the target path is stored in the data node;
and if the corresponding data node does not exist, creating the data node and storing the target path in the configuration center.
Optionally, the receiving module is further configured to receive a self-defined scanning path, an annotation, and a verification rule, where the scanning path is a data source path indicating to store data to be configured, the annotation is a tag of data to be called in the data to be configured, and the verification rule is a configuration rule for the data to be called;
the obtaining module is further configured to obtain a target path under the scanning path according to the annotation, where the target path is a path corresponding to the data to be called;
the storage module is further configured to store the target path and the verification rule in the configuration center for subsequent configuration.
The application provides an electronic device, the apparatus includes: a processor and a memory;
the memory has stored therein an application executable by the processor for causing the processor to perform the steps of the data configuration method as described.
The present application provides a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the data arrangement method as described.
As can be seen from the above, based on the above embodiments, the present application provides a data configuration method, where the target path of the data to be called is obtained through the scan path and the annotation, and the target path is configured in a user-defined manner, so that a research and development flow of data configuration is greatly reduced, efficiency is improved, and technical problems of long research and development period, low efficiency, and high cost due to continuous research and development of corresponding data configuration required by research and development personnel due to business changes and increases are solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a flow chart illustrating a data configuration method 100 according to the present invention;
FIG. 2 is a flow chart illustrating a data configuration method 200 according to the present invention;
FIG. 3 is a flow chart illustrating a data configuration method 300 according to the present invention;
FIG. 4 is a flow chart illustrating a data configuration method 400 according to the present invention;
FIG. 5 is a schematic data flow diagram illustrating the annotation generation of the target path according to the present invention;
FIG. 6 is an architecture diagram of the data configuration system of the present invention;
FIG. 7 is a block diagram of a data configuration device according to the present invention.
Description of the marks
101 receiving module
102 acquisition module
103 memory module
104 serialization module
105 authentication module
106 judging module
201 custom end
202 SDK terminal
2021 configuration center
203 configuration system
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The data configuration system is a system which is widely applied, and in a house leasing transaction system, the transaction processes of various procedures in business can be constructed by adopting the data configuration system. For example, which bank is selected to make a loan, the staff at the service end configures the data of the bank and the corresponding data of the bank transaction order into a data configuration system for the customer to select, and records the necessary information of the customer on the transaction order, and the like.
In the above process, the staff usually only knows the flow of bank loan, the business staff needs to tell the flow to the research and development staff, the research and development staff performs the bottom development of the data configuration system through the business flow, and the function is brought on line to the house lease transaction system, but in the actual development process, the communication cost of the business staff and the research and development staff is very high, and the diversity and the degeneration of the data configuration are very obvious in practice.
Fig. 1 is a flow chart illustrating a data configuration method 100 according to the present invention. As shown in fig. 1, in an embodiment, the present application provides a data configuration method, including:
s101, receiving a self-defined scanning path and an annotation, wherein the scanning path is a data source path indicating data to be configured to be stored, and the annotation comprises a mark of data to be called in the data to be configured;
in this step, a specific implementation of receiving the custom scan path and the annotation is provided, and it should be noted that two basic elements are required for completing the data configuration, the first is the data source, and the second is the configuration rule of the data. In this step, we first need to solve the problem of the data source, the data source is indicated by the scan path, the path of the data source is provided in this step, and is used to find the data to be configured according to the scan path, and the annotation is used to perform data configuration on not all the data to be configured, but only on a part of the data to be configured, so that the annotation can be used as a mark for recording which data, that is, the data to be called, needs to be subsequently processed. In addition, we allow the data to be called of the annotation mark to be the whole content of the data to be configured.
S102, acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called;
in this step, a specific implementation is provided for obtaining a target path under the scan path according to the annotation, and according to the explanation in the previous step, the path of the annotation mark is only a data source path of part or all of the data to be configured, so in this step, we can obtain the data source path of the data to be called, that is, the target path, through the customized annotation and the scan path.
S103, storing the target path in the configuration center for subsequent configuration.
In this step, a specific embodiment of storing the target path in the configuration center is provided, and as mentioned above, the configuration rule may be configured in the configuration center, and when we can obtain a data source through the target path, subsequent data configuration may be performed, it should be noted that the configuration rule does not have to be preset in the configuration center, and this embodiment does not relate to the configuration rule, and the configuration rule is only for better explaining the present invention.
The embodiment provides a data configuration method, which includes firstly, receiving a self-defined scanning path and an annotation, wherein the scanning path is a data source path indicating to store data to be configured, and the annotation is a mark of data to be called in the data to be configured; then, acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called; finally, the target path is stored in the configuration center for subsequent configuration. And configuring a data source through the self-defined scanning path and the annotation, so that the data to be called can be acquired according to the data source in the subsequent process. And after the target path corresponding to the annotation is obtained, the annotation is stored in the configuration center for subsequent data configuration steps.
In order to better explain the embodiment, we take the JAR package of the SDK as an example to further explain the above embodiment, and it should be noted that the JAR package of the SDK is only for better explaining the embodiment, and is not a specific limitation to the embodiment, where the SDK is a set of development tools used by software engineers to create application software for a specific software package, software framework, hardware platform, operating system, and the like, and the JAR is an archive file.
And loading the self-defined annotation of the SDK on the POJO needing to be configured, wherein the POJO is an abbreviation of a Plain Ordinary JavaObject, but the POJO can be used as an assistance class supporting business logic by referring to a common java object which does not use Entity Beans. We also need to configure the scan path of SDK, and we can see that only the scan path and the annotation actually need to be configured by a service person or a developer in a customized manner, and further, the class of the annotation @ LeaseConfig can be marked under the scan path, and we can obtain all corresponding Fields under the annotation class, and place these Fields in a list nested list type Object, that is, the target path. Finally we store the target path in the configuration center.
In an embodiment, the annotation further includes a method rule, and the method rule is a rule method for obtaining the data to be called from the data to be configured through the method rule.
In this embodiment, it is provided that the annotation may be a tag of the data to be called, and the method rule may be loaded, where the method rule may provide a structured rule of the annotation class, where the method rule and the configuration rule belong to different rules, the method rule is a data structured rule of a class corresponding to the annotation, and may be understood as a config _ type and Bean information corresponding to the config _ type, and then the method rule is stored after being structured by the class corresponding to the annotation. The Bean information can be understood as a reusable Java component which can be called by Java application programs such as Applet, Servlet, SP and the like, and can also be visually used by a Java development tool. It contains Properties such as Properties (Properties), Methods (Methods), Events (Events), etc.
Fig. 2 is a flow chart illustrating a data configuration method 200 according to the present invention. As shown in fig. 2, in an embodiment, after the step of obtaining the target path under the scan path according to the annotation, where the target path is a path corresponding to the data to be called, the method further includes:
s201, serializing the target path in a steam flow mode to obtain storage data;
in this step, a specific implementation of serializing the target path is provided. The serialization optimization can be carried out by a stream method in the step.
S203, storing the target path in the configuration center for subsequent configuration, and storing the stored data in the configuration center for subsequent configuration.
In the step, the serialized data are stored, and in the subsequent data configuration process, the stored data can be deserialized to obtain the target path again.
In the embodiment, because the JSON serialization mode in the prior art has the hidden bug, when the long data is serialized into the int data, the subsequent data configuration is problematic, and the data is invalid, so that the stream method is adopted to perform serialization optimization on the data, the most initial data form is ensured, and the normal operation of the subsequent data configuration is ensured.
Fig. 3 is a flow chart illustrating a data configuration method 300 according to the present invention. As shown in fig. 3, in an embodiment, the receiving a customized annotation and a scan path, where the scan path is a data source path indicating data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured, and the tag includes:
s301, receiving a self-defined annotation, a scanning path and an authentication identifier, wherein the scanning path is a data source path indicating data to be configured, and the annotation comprises a mark of data to be called in the data to be configured;
in this step, a specific implementation manner of loading the authentication identifier is provided, and the authentication identifier may be understood as a login user name and a login password.
S302, the storing the target path in the preset configuration center for subsequent configuration includes:
and the configuration center judges whether the authentication mark has a storage authority or not according to the authentication mark, and if the authentication mark has the storage authority, the target path is stored in the preset configuration center for subsequent configuration.
In this step, a specific implementation manner of performing authentication through the authentication identifier is provided, and we can determine whether the target path has a storage right stored in the configuration center through a user name and a password.
In this embodiment, an authentication implementation of whether the target path can be stored in the configuration center through the authentication identifier pair is provided. The authentication identifier can be understood as the user name and the password, and firstly, a self-defined annotation and a scanning path and the authentication identifier are received, wherein the scanning path is a data source path indicating that data to be configured is stored, and the annotation is a mark of data to be called in the data to be configured; and the configuration center judges whether the authentication mark has a storage authority or not according to the authentication mark, and if the authentication mark has the storage authority, the target path is stored in the configuration center for subsequent configuration. According to the embodiment, the specific implementation mode that the target path is stored in the configuration center can be effectively performed according to the authentication result.
In one embodiment, storing the target path in the configuration center for subsequent configuration comprises:
the configuration center judges whether a data node corresponding to the target path exists or not, wherein the data node is a corresponding data node in a pre-built data structure of the configuration center;
if the corresponding data node exists, updating data in the data node according to the target path so that the target path is stored in the data node;
and if the corresponding data node does not exist, creating the data node and storing the target path in the configuration center.
In this embodiment, a specific implementation is provided for storing the target path in the corresponding data node. The data node of the configuration center is a data source interface which has a storage function and can provide the configuration rule, the data source can be obtained through the target path, and all conditions of data configuration can be completed according to the built-in configuration rule. Of course, the configuration rule may not be configured in the configuration center, so a data node may be already established or not established, if already established, only the target path needs to be stored in the data node, and if the data node already stores other data, the target path is updated. And if the target path is not established, the target path is stored in the data node after the new data node is established.
Fig. 4 is a flowchart illustrating a data configuration method 400 according to the present invention. As shown in fig. 4, in an embodiment, the receiving a customized annotation and a scan path, where the scan path is a data source path indicating data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured, and the tag includes:
s401, receiving a self-defined scanning path, an annotation and a verification rule, wherein the scanning path is a data source path indicating to store data to be configured, the annotation comprises a mark of the data to be called in the data to be configured, and the verification rule is a configuration rule of the data to be called;
in this step, a specific implementation manner of a custom check rule is provided, and the check rule may be understood as the configuration rule, and the check rule may be completely freely defined by a user, or some intermediate rules may be configured for the user to define.
S402, storing the target path in a preset configuration center for subsequent configuration, and storing the target path and the check rule in the configuration center for subsequent configuration.
In this embodiment, a specific implementation manner of storing the target path and the verification rule in the configuration center is provided.
In this embodiment, a specific implementation manner for customizing the verification rule at the same time is provided. Receiving a self-defined annotation, a scanning path and a verification rule, wherein the scanning path is a data source path indicating data to be configured to be stored, the annotation is a mark of data to be called in the data to be configured, and the verification rule is a configuration rule of the data to be called; and storing the target path and the check rule in the configuration center for subsequent configuration. And completing data configuration through the verification rule and the target path in subsequent configuration.
The application also provides a data configuration system, which comprises a user-defined end and a configuration processing unit with a configuration center;
the user-defined end is used for defining a scanning path and an annotation through a preset operation and sending the scanning path and the annotation to the configuration processing unit;
the configuration processing unit is used for receiving the customized scanning path and the annotation, wherein the scanning path is a data source path indicating data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured; acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called; and storing the target path in the configuration center.
In this embodiment, a specific implementation manner of a data configuration system is provided, where the custom end may be understood as a business end, and both business personnel and research and development personnel may define the scan path and the annotation through the custom end, and then the custom end may send the scan path and the annotation to the configuration processing unit, where the configuration processing unit may be understood as an SDK, the configuration processing unit receives the scan path and the annotation, where the scan path is a data source path indicating that configuration data is stored, and the annotation is a mark of data to be called in the data to be configured. Therefore, the target path under the scan path may be obtained through the annotation, the target path is stored in the configuration center, how to calculate the data under the target path may be configured through a configuration rule in the configuration center, and a custom port may also be provided for a research and development worker or a service worker to create the configuration rule.
Optionally, the configuration processing unit is further configured to perform serialization processing on the target path to obtain stored data; serializing the storage data in a steam flow mode, and storing the serialized storage data and the configuration center for subsequent configuration.
In this embodiment, a specific implementation of serializing the target path is provided, where the configuration processing unit, i.e. the SDK, is further configured to serialize the target path by means of a steam stream, and the advantage of the steam stream serialization has been explained above, and is not described here again.
Optionally, the configuration processing unit is further configured to receive a self-defined annotation and a scan path, and an authentication identifier, where the scan path is a data source path indicating that data to be configured is stored, and the annotation is a tag of data to be called in the data to be configured; and the configuration center judges whether the authentication mark has a storage authority or not according to the authentication mark, and if the authentication mark has the storage authority, the target path is stored in the configuration center for subsequent configuration.
In this embodiment, a specific implementation manner of authentication is provided, where the authentication identifier may be understood as the user name and the password, and determine whether the user name and the password have the specific storage authority, and if a user corresponding to the user name and the password has an authority to perform data configuration, store the target path in the configuration center.
In an embodiment, the configuration center determines whether a data node for storing the target path exists,
if the corresponding data node exists, updating data in the data node according to the target path so that the target path is stored in the data node;
and if the corresponding data node does not exist, creating the data node and storing the target path in the configuration center.
In this embodiment, a specific implementation manner of determining whether the data node exists and storing the target path is provided.
In an embodiment, the configuration processing unit is further configured to receive a self-defined annotation and a scan path, and a check rule, where the scan path is a data source path indicating that data to be configured is stored, the annotation is a tag of data to be called in the data to be configured, and the check rule is a configuration rule for the data to be called; and storing the target path and the check rule in the configuration center for subsequent configuration.
The embodiment further provides a specific implementation manner of storing the target path by customizing the annotation, the scanning path and the verification rule.
Fig. 5 is a schematic diagram illustrating a data flow of generating the target path according to the annotation of the present invention, and fig. 6 is an architecture diagram of the data configuration system according to the present invention. As shown in fig. 5 and fig. 6, in an embodiment, the present application further provides another data configuration system, which includes a custom end and an SDK end with a configuration center, and a configuration system;
the user-defined end obtains a scanning path and an annotation, a check rule and an authentication identifier through a first preset operation, and sends the scanning path, the annotation, the check rule and the authentication identifier to the SDK end;
the SDK end is used for receiving the scanning path, the annotation and the check rule and is also used for receiving the authentication identifier, wherein the scanning path is a data source path indicating that data to be configured is stored, and the annotation is a mark of data to be called in the data to be configured;
acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called;
serializing the target path and the check rule in a steam flow mode to obtain stored data;
sending the stored data to the configuration center;
the configuration center judges whether the authentication mark has a storage authority or not according to the authentication mark, judges whether a corresponding data node for storing the storage data exists or not if the authentication mark has the storage authority, and updates the data in the data node according to the target path so that the storage data is stored in the data node if the authentication mark has the storage authority; if the corresponding data node does not exist, creating the data node and storing the stored data in the configuration center;
and sending the SDK end to the configuration system so that the configuration system performs data configuration through the SDK end.
In this embodiment, a data configuration system is provided, which aims to provide a general technical framework to configure a configuration requirement of variable instant service data. Firstly, defining the scanning path and the annotation, the check rule and the authentication identifier by one of the custom terminals according to the first predetermined operation and the second predetermined operation of the user, and providing two parts of contents of a data source and a configuration rule if data configuration is required in essence of data configuration, where the check rule may be connected to the configuration rule, for example, we may set the check rule to be greater than 10 and less than 20 and cannot be empty, and the scanning path and the annotation are for providing the data source. In the self-defining process, we can understand that a jar packet of an SDK is defined on the self-defining end, the scan path corresponds to the data to be configured, and the mark in the annotation is the call configuration data, that is, the data source corresponds to the call configuration data, and we can mark a class through the annotation to achieve the purpose of obtaining the call configuration data from the data to be configured. Taking a jar packet of an SDK as an example, loading the annotation on a pojo, configuring a packet path, namely the scanning path, wherein the annotation can be understood as a class marked with @ LeaseConfig and the method rule, and then acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called; then, we can understand that all Fields corresponding to the annotation class can be obtained according to the annotation, then after the method rule corresponding to each field is configured correspondingly, an Object of a list nested list type is created, the Fields and the corresponding method rule are put into the Object, we understand the Object as the target path, it needs to be pointed out that the invocation of the Fields can be realized in the form of attribute Fields, the annotation in this way is automatically read, and has strong perceptibility so as to facilitate the execution processing operation inside the SKD end, and the scan path and the annotation can further understand as config _ type and its corresponding Bean information. In addition, the verification rule may be defined by a user, may also be configured directly in the configuration center of the SDK, or even configured directly in the configuration system, the verification rule may be understood as the above configuration rule, the scan path, the annotation, and the verification rule are structured through the above processing procedure, and are independent from each other, and each data configuration is independent from each other when the scan path and the annotation are redefined each time, and the verification rule is redefined each time, so as to avoid data interference between each other. Then, serializing the target path and the check rule in a steam flow mode to obtain stored data; then the stored data is sent to the configuration center; it is noted that the configuration center may be implemented using zookeeper. And finally, the configuration center also authenticates according to the authentication identifier, judges whether the stored data corresponds to the data node or not, and finally stores the stored data in the data node.
The data node is a temporary node EPHEMERAL used in the SDK end, and when the service of the user-defined end is down, the corresponding zookeeper data node also fails, so that the life cycles of the user-defined end and the data node can be kept consistent, and when the data in the data node of the zookeeper is up to date after the user-defined end is redeployed, the configuration system can acquire the up-to-date data without redeploying.
After the above process has completed the deployment work of the SDK end, the SDK end obtains the storage data, i.e., the target path, and also obtains the verification rule, i.e., the configuration rule, and sends the SDK end to the configuration system, the storage data is deserialized and restored to the target path, and the configuration system can obtain the data to be called from the database according to the target path. It should be noted that only the path is defined in the SDK, the data to be configured is stored in the database of the configuration system, and the configuration system can complete the data configuration according to the data source and the configuration rule under the condition that the data source and the configuration rule are both obtained according to the above steps to solve the problem of the data source.
As shown in fig. 5, the annotation can be understood as a tag with Class1 and Name1, Field1 and Field2, and as continuing to the Field dn, the data to be configured can be understood as the data to be configured, the data to be configured are respectively stored in different fields, we can call the corresponding data to be configured by using the Field of the Field, we can tag a Class, i.e. after Class1, we call only the fields of Class1, i.e. Field1 and Field 2. In addition, we can also mark one rule method, for example, we only need the data of the Name1 Field, and finally we get the Field of Class1, and mark that we need the data corresponding to the Name1, and then generate a table, which records the Field we need, and the rule method, that is, the Name 1.
In the configuration system, the data to be configured corresponding to the Name1 under the Field1 and the Field2 can be obtained according to the table, that is, the data to be called solves the problem of the data source. Since this table can be understood as a path for acquiring the data to be called, we understand it as the target path.
FIG. 7 is a block diagram of a data configuration device according to the present invention. As shown in fig. 7, in one embodiment, the present application provides a data configuration apparatus, including:
the receiving module 101 is configured to receive a custom scanning path and an annotation, where the scanning path is a data source path indicating that data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured;
an obtaining module 102, configured to obtain a target path under the scan path according to the annotation, where the target path is a path corresponding to the data to be called;
a storage module 103, configured to store the target path in the preset configuration center for subsequent configuration.
In one embodiment, the apparatus further comprises:
a serialization module 104, configured to perform serialization processing on the target path to obtain stored data;
the storage module 103 is further configured to store the storage data in the configuration center for subsequent configuration.
In an embodiment, the receiving module is configured to receive a self-defined annotation and a scan path, and an authentication identifier, where the scan path is a data source path indicating that data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured;
the device also includes: an authentication module 104;
the authentication module 104 is further configured to determine, by the configuration center, whether the configuration center has a storage right according to the authentication identifier, and if the authentication identifier has the storage right, store the target path in a preset configuration center for subsequent configuration.
In one embodiment, the apparatus further comprises: the determining module 105 is further configured to determine, by the configuration center, whether a data node for storing the target path exists, where the data node is a corresponding data node in a pre-established data structure of the configuration center; if the corresponding data node exists, updating data in the data node according to the target path so that the target path is stored in the data node;
and if the corresponding data node does not exist, creating the data node and storing the target path in the configuration center.
In an embodiment, the receiving module 101 is further configured to receive a self-defined scanning path and an annotation, and a verification rule, where the scanning path is a data source path indicating that data to be configured is stored, the annotation includes a tag of data to be called in the data to be configured, and the verification rule is a configuration rule for the data to be called;
the storage module 103 is further configured to store the target path and the check rule in the configuration center for subsequent configuration.
In one embodiment, the present application provides an electronic device, the apparatus comprising: a processor and a memory;
the memory stores an application executable by the processor for causing the processor to perform the steps of the data configuration method.
In an embodiment, a computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the data configuration method.
In practical applications, the computer readable medium may be included in the apparatus/device/system described in the above embodiments, or may exist alone without being assembled into the apparatus/device/system. The above-mentioned computer-readable storage medium carries one or more programs which, when executed, implement the image data processing method of the described data.
According to embodiments disclosed herein, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example and without limitation: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing, without limiting the scope of the present disclosure. In the embodiments disclosed herein, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for configuring data, the method comprising:
receiving a self-defined scanning path and an annotation, wherein the scanning path is a data source path indicating that data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured;
acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called;
and storing the target path in a preset configuration center for subsequent configuration.
2. The data configuration method according to claim 1, wherein the annotation further comprises a method rule, and the method rule is a rule method for obtaining the data to be configured from the method rule.
3. The data configuration method according to claim 2, wherein after the step of obtaining the target path under the scan path according to the annotation, the target path corresponding to the data to be called, the method further comprises:
serializing the target path in a steam flow mode to obtain storage data;
the storing the target path in the configuration center for subsequent configuration is to store the stored data in the configuration center for subsequent configuration.
4. The data configuration method according to claim 1, wherein the receiving a custom annotation and a scan path, wherein the scan path is a data source path indicating data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured, and the receiving includes:
receiving a self-defined annotation and a scanning path and an authentication identifier, wherein the scanning path is a data source path indicating data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured;
the storing the target path in the preset configuration center for subsequent configuration comprises:
the configuration center judges whether the authentication mark has storage authority or not,
and if the authentication identification has storage authority, storing the target path in a preset configuration center for subsequent configuration.
5. The data configuration method of claim 1, wherein storing the target path in the configuration center for subsequent configuration comprises:
the configuration center judges whether a data node corresponding to the target path exists or not, wherein the data node is a corresponding data node in a pre-built data structure of the configuration center;
if the corresponding data node exists, updating data in the data node according to the target path so that the target path is stored in the data node;
and if the corresponding data node does not exist, creating the data node and storing the target path in the configuration center.
6. The data configuration method according to any one of claims 1 to 5, wherein the receiving a customized annotation and a scan path, wherein the scan path is a data source path indicating data to be configured is stored, and the annotation includes a tag of data to be called in the data to be configured, and the annotation includes:
receiving a self-defined scanning path, an annotation and a verification rule, wherein the scanning path is a data source path indicating data to be configured is stored, the annotation comprises a mark of data to be called in the data to be configured, and the verification rule is a configuration rule of the data to be called;
and storing the target path in a preset configuration center for subsequent configuration, and storing the target path and the check rule in the configuration center for subsequent configuration.
7. A data configuration system is characterized in that the system comprises a self-defining end and a configuration processing unit with a configuration center;
the user-defined end is used for defining a scanning path and an annotation through a preset operation and sending the scanning path and the annotation to the configuration processing unit;
the configuration processing unit is used for receiving the customized scanning path and the annotation, wherein the scanning path is a data source path indicating data to be configured is stored, and the annotation comprises a mark of data to be called in the data to be configured; acquiring a target path under the scanning path according to the annotation, wherein the target path is a path corresponding to the data to be called; and storing the target path in the configuration center.
8. The data configuration system of claim 7, wherein the configuration processing unit is further configured to serialize the storage data by means of a steam stream, and store the serialized storage data in the configuration center for subsequent configuration.
9. An electronic device, wherein the apparatus comprises: a processor and a memory;
the memory has stored therein an application executable by the processor for causing the processor to perform the steps of the data configuration method as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the data arrangement method of any one of claims 1 to 6.
CN202010563027.7A 2020-06-19 2020-06-19 Data configuration method, device and system, electronic equipment and storage medium thereof Pending CN111752601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010563027.7A CN111752601A (en) 2020-06-19 2020-06-19 Data configuration method, device and system, electronic equipment and storage medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010563027.7A CN111752601A (en) 2020-06-19 2020-06-19 Data configuration method, device and system, electronic equipment and storage medium thereof

Publications (1)

Publication Number Publication Date
CN111752601A true CN111752601A (en) 2020-10-09

Family

ID=72675896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010563027.7A Pending CN111752601A (en) 2020-06-19 2020-06-19 Data configuration method, device and system, electronic equipment and storage medium thereof

Country Status (1)

Country Link
CN (1) CN111752601A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113670997A (en) * 2021-07-28 2021-11-19 广州大学 Scanning electrochemical microscope path planning method and device based on script analysis
CN116226152A (en) * 2023-04-25 2023-06-06 社治无忧(成都)智慧科技有限公司 Personal room data self-updating method and system based on community management

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009129401A (en) * 2007-11-28 2009-06-11 Infodoc Technology Corp Web page annotation configuration, web page annotation system, and its method
CN107908442A (en) * 2017-12-07 2018-04-13 武汉斗鱼网络科技有限公司 Resource loading method, device, terminal device and computer-readable recording medium based on spring
CN108363566A (en) * 2018-01-30 2018-08-03 中国平安人寿保险股份有限公司 File configuration method, intelligent terminal and storage medium in a kind of project development process
CN110377289A (en) * 2019-07-01 2019-10-25 北京字节跳动网络技术有限公司 A kind of data analysis method, device, medium and electronic equipment
CN110928548A (en) * 2019-11-14 2020-03-27 腾讯音乐娱乐科技(深圳)有限公司 Data processing method and equipment
CN111259067A (en) * 2020-01-21 2020-06-09 褚晶晶 Method, device and equipment for realizing DAO interface based on Spring

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009129401A (en) * 2007-11-28 2009-06-11 Infodoc Technology Corp Web page annotation configuration, web page annotation system, and its method
CN107908442A (en) * 2017-12-07 2018-04-13 武汉斗鱼网络科技有限公司 Resource loading method, device, terminal device and computer-readable recording medium based on spring
CN108363566A (en) * 2018-01-30 2018-08-03 中国平安人寿保险股份有限公司 File configuration method, intelligent terminal and storage medium in a kind of project development process
CN110377289A (en) * 2019-07-01 2019-10-25 北京字节跳动网络技术有限公司 A kind of data analysis method, device, medium and electronic equipment
CN110928548A (en) * 2019-11-14 2020-03-27 腾讯音乐娱乐科技(深圳)有限公司 Data processing method and equipment
CN111259067A (en) * 2020-01-21 2020-06-09 褚晶晶 Method, device and equipment for realizing DAO interface based on Spring

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113670997A (en) * 2021-07-28 2021-11-19 广州大学 Scanning electrochemical microscope path planning method and device based on script analysis
CN116226152A (en) * 2023-04-25 2023-06-06 社治无忧(成都)智慧科技有限公司 Personal room data self-updating method and system based on community management

Similar Documents

Publication Publication Date Title
CN105893850B (en) Leak restorative procedure and device
CN107979508A (en) Micro services test method and device
CN111813391A (en) Workflow generation method and device, computer equipment and storage medium
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN108196878A (en) Method and device for generating application program installation package, electronic equipment and storage medium
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN112905459B (en) Service interface testing method and device, electronic equipment and storage medium
CN112835782B (en) Interface access test method and system
CN111752601A (en) Data configuration method, device and system, electronic equipment and storage medium thereof
CN110007921A (en) A kind of code dissemination method and device
CN113127108A (en) Service request processing method and device, storage medium and electronic equipment
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN116107885A (en) Interface testing method, device, equipment and storage medium
CN106952426B (en) Data processing method and device
CN117931666B (en) System and method for testing core framework of software radio communication equipment
CN114003510A (en) Script testing method, device, equipment and medium based on Mock service
CN110162310B (en) Plug-in interface test method and device, computer equipment and storage medium
CN115883310A (en) Service deployment method, service deployment system, electronic device, and storage medium
CN112561690A (en) Method, system, equipment and storage medium for testing credit card staging service interface
CN106302011B (en) Multi-terminal-based test method and terminal
CN111949536A (en) JAVA application program testing method and system based on bytecode technology
CN108170760B (en) Intelligent hardware management system and equipment
CN115934129A (en) Software project updating method and device, computer equipment and storage medium
CN115878475A (en) Abnormal scene testing method, device and system
JP6382610B2 (en) Simulator system, gateway system test apparatus, and gateway system test method

Legal Events

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