CN117271550A - Processing method, device and equipment of data processing statement and storage medium - Google Patents

Processing method, device and equipment of data processing statement and storage medium Download PDF

Info

Publication number
CN117271550A
CN117271550A CN202310855257.4A CN202310855257A CN117271550A CN 117271550 A CN117271550 A CN 117271550A CN 202310855257 A CN202310855257 A CN 202310855257A CN 117271550 A CN117271550 A CN 117271550A
Authority
CN
China
Prior art keywords
statement
identifier
metadata
processed
fixed
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
CN202310855257.4A
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.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network 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 Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202310855257.4A priority Critical patent/CN117271550A/en
Publication of CN117271550A publication Critical patent/CN117271550A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2445Data retrieval commands; View definitions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a processing method, a device, equipment and a storage medium of a data processing statement applied to the technical field of computers, wherein the method firstly acquires a statement to be processed comprising metadata; metadata included in the statement to be processed is represented by a first identifier; and replacing the first identifier in the statement to be processed with the fixed identifier according to the mapping relation between the first identifier of the metadata and the fixed identifier of the metadata, and storing the first identifier. The first mark is replaced by the to-be-processed statement after the fixed mark, so that the statement can be normally analyzed by the system and cannot be influenced by modification of the first mark. Thus, the problem of influencing statement analysis caused by modifying the identification can be avoided.

Description

Processing method, device and equipment of data processing statement and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a data processing statement.
Background
The user is able to implement the development of the application using the application platform, i.e., the development service of the application provided by the service (application Platform as a Service, aPaaS) system. The aPaaS system provides the user with the modules of visualizations needed to develop the application. The user can build applications using customizable forms, workflows, and business rules provided by the aPaaS system.
The user creates metadata in the data model for use by the application program. The user can configure variable user identifications for the metadata. After the metadata is written into the database, the aPaaS system configures the metadata with an immutable system identification. The aPaaS system uses the system identification to identify metadata.
In the process of using the aPaaS system, the user can trigger the generation of sentences comprising metadata to realize the operation on the data. Metadata in the statement is represented by a user identification. The aPaaS system needs to parse statements based on the maintained mapping relationship of the user identity and the system identity. In some scenarios, a user modifying the user identification of metadata may affect the aPaaS system to parse statements that include the metadata.
Disclosure of Invention
In view of this, the present application provides a processing method, apparatus, device, and storage medium for a data processing statement, which enable a user to modify the identification of metadata without affecting the parsing of the statement including the metadata by the system.
Based on this, the technical scheme that this application provided is as follows:
in a first aspect, the present application provides a method for processing a data processing statement, the method including: acquiring a statement to be processed, and determining metadata included in the statement to be processed, wherein the metadata is represented by a first identifier of the metadata; replacing the first identifier included in the statement to be processed with the fixed identifier based on a mapping relation between the first identifier and the fixed identifier to obtain a replaced statement to be processed, wherein the fixed identifier is a unique system identifier of the metadata; and storing the replaced to-be-processed statement so as to call the replaced to-be-processed statement to execute the data processing step corresponding to the replaced to-be-processed statement.
In a possible implementation manner, the replacing the first identifier included in the statement to be processed with the fixed identifier includes: identifying the start and stop positions of the first mark in the statement to be processed; and replacing the first mark with the fixed mark based on the starting and ending positions.
In one possible implementation manner, the statement to be processed includes a plurality of metadata, and the replacing the first identifier with the fixed identifier based on the start-stop position includes: in order of replacement, the following operations are sequentially performed for the first identifier of each metadata included in the plurality of metadata: replacing the first identifier with a fixed identifier of the metadata based on the start-stop position of the first identifier of the metadata; wherein the replacement order is the order of the start-stop position of the first mark of each metadata from back to front in the statement to be processed.
In one possible implementation manner, the determining metadata included in the statement to be processed includes: analyzing the statement to be processed by using a preset statement grammar rule to obtain metadata included in the statement to be processed, wherein the statement grammar rule is used for defining a statement composition structure included in the statement to be processed and connection relations among the statement composition structures, and the statement composition structure includes metadata.
In one possible implementation, the method further includes: generating a statement to be displayed, wherein the statement to be displayed comprises the metadata, the metadata is represented by the fixed identifier, and the statement to be displayed is generated after the data processing step is executed by calling the replaced statement to be processed and is used for realizing the display of the metadata; replacing the fixed identifier included in the statement to be displayed with the first identifier based on the mapping relation between the first identifier and the fixed identifier; and sending the statement to be displayed to the client.
In one possible implementation, the method further includes: acquiring an identification modification instruction aiming at the metadata, wherein the identification modification instruction comprises a second identification; and updating the mapping relation between the first identifier and the fixed identifier into the mapping relation between the second identifier and the fixed identifier.
In a second aspect, the present application provides a processing apparatus for a data processing statement, the apparatus comprising: the first acquisition unit is used for acquiring a statement to be processed, determining metadata included in the statement to be processed, wherein the metadata is represented by a first identifier of the metadata; the first replacing unit is used for replacing the first identifier included in the statement to be processed with the fixed identifier to obtain a replaced statement to be processed based on a mapping relation between the first identifier and the fixed identifier, and the fixed identifier is a unique system identifier of the metadata; the storage unit is used for storing the replaced to-be-processed statement so as to call the replaced to-be-processed statement to execute the data processing step corresponding to the replaced to-be-processed statement.
In one possible implementation manner, the first replacing unit is configured to replace the first identifier included in the statement to be processed with the fixed identifier, and includes: the first replacing unit is used for identifying the start-stop position of the first mark in the statement to be processed; and replacing the first mark with the fixed mark based on the starting and ending positions.
In one possible implementation manner, the statement to be processed includes a plurality of metadata, and the first replacing unit is configured to replace the first identifier with the fixed identifier based on the start-stop position, and includes: the first replacing unit is configured to sequentially perform, according to a replacing order, the following operations for the first identifier of each metadata included in the plurality of metadata: replacing the first identifier with a fixed identifier of the metadata based on the start-stop position of the first identifier of the metadata; wherein the replacement order is the order of the start-stop position of the first mark of each metadata from back to front in the statement to be processed.
In a possible implementation manner, the first obtaining unit is configured to determine metadata included in the statement to be processed, and includes: the first obtaining unit is configured to analyze the sentence to be processed by using a preset sentence grammar rule, so as to obtain metadata included in the sentence to be processed, where the sentence grammar rule is used to define a sentence composition structure included in the sentence to be processed and a connection relationship between the sentence composition structures, and the sentence composition structure includes metadata.
In one possible implementation, the apparatus further includes: the generation unit is used for generating a statement to be displayed, the statement to be displayed comprises the metadata, the metadata is represented by the fixed identifier, and the statement to be displayed is generated after the data processing step is executed by calling the replaced statement to be processed and is used for realizing the display of the metadata; a second replacing unit, configured to replace, based on a mapping relationship between the first identifier and the fixed identifier, the fixed identifier included in the statement to be displayed with the first identifier; and the sending unit is used for sending the statement to be displayed to the client.
In one possible implementation, the apparatus further includes: a second obtaining unit, configured to obtain an identifier modification instruction for the metadata, where the identifier modification instruction includes a second identifier; and the updating unit is used for updating the mapping relation between the first identifier and the fixed identifier into the mapping relation between the second identifier and the fixed identifier.
In a third aspect, the present application provides an electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of the first aspects.
In a fourth aspect, the present application provides a computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of the first aspects.
In a fifth aspect, the present application provides a computer program product which, when run on a device, causes the device to perform the method of the first aspect.
The application provides a processing method, a device, equipment and a storage medium of a data processing statement, wherein the method firstly acquires a statement to be processed comprising metadata; metadata included in the statement to be processed is represented by a first identifier; and replacing the first identifier in the statement to be processed with the fixed identifier according to the mapping relation between the first identifier of the metadata and the fixed identifier of the metadata to obtain a replaced statement to be processed, and storing the replaced statement. The stored replacement pending statement can be called to perform the corresponding data processing step. The first mark is replaced by the to-be-processed statement after the fixed mark, so that the statement can be normally analyzed by the system and cannot be influenced by modification of the first mark. Thus, the problem of influencing statement analysis caused by modifying the identification can be avoided.
Drawings
Fig. 1 is a schematic frame diagram of an exemplary application scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart of a method for processing a data processing statement according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a syntax tree obtained after analyzing a sentence to be processed according to an embodiment of the present application;
FIG. 4 is a schematic diagram of indexes of a pending statement according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a processing device for a data processing statement according to an embodiment of the present application;
fig. 6 is a schematic diagram of a basic structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to facilitate understanding and explanation of the technical solutions provided by the embodiments of the present application, the background art of the present application will be described first.
In using the aPaaS system, a user creates metadata for objects, fields, etc. The user can configure the user identification for the metadata based on usage habits when creating the metadata. The user identification can be the name of the metadata. The name of the user-configured metadata can be referred to as an application programming interface alias (Application Programming Interface alias, APIAlias). When the metadata is written into the database, the aPaaS system assigns a system identifier to the metadata. The system identification is a fixed identification. The aPaaS system identifies metadata based on the system identification.
The user can pre-write or generate object query language (object query language, OQL) statements based on services provided by the aPaaS system. The OQL statement is used to implement operations on objects that the database includes. The OQL statement includes metadata represented by a user identification. The aPaaS system stores the OQL statement, and when the OQL statement needs to be called, identifies metadata included in the OQL statement based on a mapping relation between the stored user identification and the system identification, analyzes the OQL statement, executes a data processing step corresponding to the OQL statement, and achieves data processing operation.
However, user modifications to the user identification of the metadata can affect the resolution of the already stored OQL statements by the aPaaS system. The aPaaS system needs to modify the user identification of the metadata in the stored OQL statement, and modifies the user identification of the metadata in the stored OQL statement into the updated user identification. The method has more contents to be changed, is easy to have the problem of slow modification speed, and can not analyze the OQL statement in the modification process. Also, in a more complex modification scenario, for example, the user modifies the user identification of metadata 1 from a to B, and newly creates metadata 2, the user identification of metadata 2 is a. In the process of modifying the OQL statement, the aPaaS system may not recognize the modification requirement of the user, and a problem of modification error occurs. This results in the problem of parsing errors that occur later in parsing the OQL statement.
Based on this, the embodiment of the application provides a processing method, a device, equipment and a storage medium of a data processing statement, wherein the method firstly acquires a statement to be processed including metadata; metadata included in the statement to be processed is represented by a first identifier; and replacing the first identifier in the to-be-processed statement with the fixed identifier according to the mapping relation between the first identifier of the metadata and the fixed identifier of the metadata, and storing the to-be-processed statement. The stored replacement pending statement can be called to perform the corresponding data processing step. The first identification of the metadata is replaced by the statement to be processed after the fixed identification of the metadata, so that the statement can be normally analyzed by the system. And the replaced statement to be processed is not affected by the modification of the first identifier. Therefore, the problem that statement analysis is affected caused by modification identification can be avoided, stored statements do not need to be changed, and the processing efficiency of identification modification is improved.
In order to facilitate understanding of a processing method of a data processing statement provided in an embodiment of the present application, a processing method of a data processing statement provided in an embodiment of the present application is described below with reference to the accompanying drawings, and a description is made below with reference to a scenario example shown in fig. 1. Referring to fig. 1, the diagram is a schematic frame diagram of an exemplary application scenario provided in an embodiment of the present application.
Those skilled in the art will appreciate that the frame diagram shown in fig. 1 is but one example in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the application is not limited in any way by the framework.
The server acquires a statement to be processed which needs to be stored: SELECT salary FROM salary _plan. The method comprises the steps that a server identifies a statement to be processed, and determines that the statement to be stored comprises two metadata, wherein first identifiers of the two metadata are respectively taken as a taken and a taken_play. The server queries the mapping relation between the first identifier and the fixed identifier of the metadata to obtain the mapping relation between the first identifier salary and the fixed identifier field_difkfhrb and the mapping relation between the first identifier salary_plan and the fixed identifier object_dinsllf. The server replaces the salary in the statement to be processed with field_difkfhrb, and replaces the salary_play with object_dinslff, so as to obtain a replaced statement to be processed: SELECT field_ difkfhrb FROM object _dinslllf. The server stores the replaced statement to be processed. The metadata included in the replaced statement to be processed is represented by a fixed identifier. Even if the user modifies the first identifier, the server-side is not affected to analyze the replaced statement to be processed.
In order to facilitate understanding of the technical solution provided by the embodiments of the present application, the following describes a processing method of a data processing statement provided by the embodiments of the present application with reference to the accompanying drawings.
Referring to fig. 2, the flowchart of a processing method of a data processing statement according to an embodiment of the present application is shown in fig. 2, where the method may include S201 to S203:
s201: and acquiring the statement to be processed, and determining metadata included in the statement to be processed, wherein the metadata is represented by a first identifier of the metadata.
The statement to be processed is a statement that includes metadata, and the metadata is represented with a first identification of the metadata. As one example, the statement to be processed is an OQL statement. The statement to be processed can also be other statement types that can include metadata, and the metadata is represented using an identifier, which is not limited in this embodiment of the present application.
The first identification of metadata can be a modifiable identification of a user for metadata configuration. As one example, the first identification of metadata is a name of the user-defined metadata. For example, the data to be processed is an OQL statement and the first identification of the metadata is apialas of the metadata. As another example, the first identification of metadata is a number of user-defined metadata. The first identifier of the metadata can be defined by a user when the metadata is created, and can also be obtained by modifying the original identifier by the user in the process of using the metadata. Specifically, the user can create a data model of the metadata. The user can change the identification of the metadata based on the data model.
The mapping between the first identifier and the fixed identifier can be maintained by a data model of the metadata, such as an object model. The user is also able to modify the first identification in a data model comprising metadata.
The embodiment of the application does not limit the way to acquire the statement to be processed. For example, the statement to be processed can be screened from the statements already stored at the server. For another example, the sentence to be processed is a sentence which is acquired by the server side and is written and generated by a user, or is automatically written and generated based on a sentence writing rule and needs to be stored.
The obtained statement to be processed includes metadata. Metadata included in the statement to be processed is determined for subsequent replacement processing for the first identification of the metadata.
In one possible implementation manner, the statement to be processed is analyzed by using a preset statement grammar rule, and metadata included in the statement to be processed is determined. The sentence grammar rule is used for defining the sentence constituent structures included in the sentence and the connection relations between the respective sentence constituent structures. Wherein the sentence composition structure includes metadata.
As an example, the preset sentence grammar rule includes a field after SELECT and an object after FROM. The fields and objects both belong to metadata. The obtained statement to be processed is as follows: SELECT salary FROM salary _plan. Analyzing the sentence to be processed based on the sentence grammar rule can determine that the salary represents metadata and the salary_play represents metadata.
Specifically, a syntax tree of SELECT salary FROM salary _plan is constructed. Referring to fig. 3, a schematic diagram of a syntax tree obtained by analyzing a sentence to be processed is shown. Wherein the query indicates that the grammar applicable to the statement to be processed is a query grammar. SELECT followed by a field, which is salary. The FROM is followed by an object, which is a sally_plan. Such that the determination that salary represents metadata, salary_play represents metadata.
In another possible implementation, the data to be processed is queried based on the identity of the respective metadata, and the metadata is determined based on the results of the query.
S202: and replacing the first identifier included in the statement to be processed with the fixed identifier based on the mapping relation between the first identifier and the fixed identifier to obtain a replaced statement to be processed, wherein the fixed identifier is the unique system identifier of the metadata.
The fixed identification of metadata is the identification of the unique system to which the system storing and processing the metadata is assigned for metadata. The fixed identification of metadata is not affected by the identification. The embodiment of the application does not limit the generation mode of the fixed identifier of the metadata. In one possible implementation, the system assigns a fixed identification to the metadata when the metadata falls into the library. In another possible implementation, the system assigns a fixed identification to the metadata when the metadata is complete in creation.
The first identifier of the metadata has a mapping relation with the fixed identifier of the metadata. The mapping relation between the first identifier and the fixed identifier is established after the first identifier of the metadata is determined and the fixed identifier of the metadata is determined. The mapping between the first identifier and the fixed identifier can be maintained by a data model of the metadata, such as an object model.
After the statement to be processed is acquired, based on metadata included in the statement to be processed, a mapping relation between a first identifier and a fixed identifier of the metadata is acquired. The fixed identifier of the metadata can be determined by using a mapping relationship between the first identifier and the fixed identifier of the metadata.
And replacing the first mark in the statement to be processed with the fixed mark to obtain replaced data to be processed. As an example, in an embodiment of the present application, a specific implementation manner of replacing a first identifier included in a statement to be processed with a fixed identifier is specifically referred to below.
S203: and storing the replaced to-be-processed statement so as to call the replaced to-be-processed statement to execute the data processing step corresponding to the replaced to-be-processed statement.
Storing the replaced to-be-processed sentence so as to call the replaced to-be-processed sentence to execute the data processing step. If the pending statement before replacement is an already stored statement, the non-replaced pending statement is updated with the replaced pending statement. And if the to-be-processed sentence is an unrecorded sentence, storing the replaced to-be-processed sentence. Based on the related content of S201-S203, it is known that the normal analysis of the statement to be processed by the system can be realized by replacing the first identifier of the metadata in the statement to be processed with the fixed identifier of the metadata. Thus, even if the user modifies the identifier, the stored statement is not required to be adjusted, normal analysis of the statement comprising metadata by the system is not affected, and a correct analysis result can be obtained.
In some possible implementations, the embodiment of the application provides a specific implementation manner of replacing a first identifier included in a statement to be processed with a fixed identifier, which includes two steps of A1 and A2:
a1: a start-stop position of the first tag in the statement to be processed is identified.
Before replacing the first identifier, a start-stop position of the first identifier in the statement to be processed needs to be determined. The start and stop positions of the first mark in the sentence to be processed comprise a start position and an end position of the first mark in the sentence to be processed. The start-stop position of the first token in the sentence to be processed can be determined specifically using the index of the first character of the first token and the index of the last character of the first token.
As an example, the statement to be processed is SELECT salary FROM salary _plan. A schematic diagram of the index of the statement to be processed is shown with reference to fig. 4. Wherein, the starting position of the salary is 7 and the ending position is 12. The start position of the salary_plan is 19 and the end position is 29.
A2: and replacing the first mark with the fixed mark based on the starting and ending positions.
Based on the determined start-stop position of the first identifier, a storage position of the first identifier can be determined. The first identifier in the start-stop position is replaced with a fixed identifier.
In some cases, the statement to be processed includes a plurality of metadata. In replacing the first identifications of the plurality of metadata, the replacement procedure may be affected by the replacement order of the first identifications of the different metadata.
For example, the statement to be processed is SELECT salary FROM salary _play, which includes two metadata, sally and sally_play, respectively.
In one implementation, if the salary is replaced first, for example, the salary is replaced by field_difkfhrb, because the storage space required by the salary and the field_difkfhrb is different, the start-stop position of the salary_play in the sentence to be processed is changed, the start-stop position of the salary_play in the sentence to be processed needs to be redetermined, and the salary_play is replaced based on the redetermined start-stop position of the salary_play.
In another implementation, the replacement order is first determined. The replacement order is the order of the start-stop position of the first flag of each metadata from back to front in the pending statement. The first identification of each metadata included in the plurality of metadata is replaced with the fixed identification of the metadata in turn in the replacement order. That is, the first marks are replaced from the start-stop position at the last, and the first marks before the start-stop position are replaced in turn until the replacement of the first marks at the start-stop position at the first is finished.
Taking SELECT salary FROM salary _play as an example of the statement to be processed, firstly replacing the salary_play, and replacing the salary_play with the fixed identification object_dinsllf of the metadata. The salary is then replaced with the fixed identification field_difkfhrb of the metadata.
The first marks are replaced by adopting the replacement sequence of the start-stop positions from back to front, so that the influence on the start-stop positions of other first marks can be reduced, and the efficiency of replacing the first marks is improved.
In some application scenarios, after storing the statement to be processed, the statement to be processed may need to be parsed based on the need to process the data, and the parsing result is executed. For example, the replaced SELECT field_ difkfhrb FROM object _dinslllf represents the field_difkfhrb column of the output object dinslllf. After executing the replaced pending statement, the system obtains field_difkfhrb column to be output.
In one possible implementation manner, the embodiment of the application provides a processing method of a data processing statement, which includes three steps, namely, B1-B3, in addition to the steps described above:
b1: generating a statement to be displayed, wherein the statement to be displayed comprises the metadata, and the metadata is represented by the fixed identification.
The statement to be displayed is a statement generated after the data processing step is executed by calling the replaced statement to be processed. The statement to be replaced is used to implement a statement that displays metadata. The statement to be displayed can be generated by the system based on the execution result of the data processing step corresponding to the statement to be processed after the execution of the replacement. The statement to be displayed includes metadata, which is represented by a fixed identifier. The metadata included in the sentence to be displayed can be determined based on sentence grammar rules that generate the sentence to be displayed.
B2: and replacing the fixed identifier included in the statement to be displayed with the first identifier based on the mapping relation between the first identifier and the fixed identifier.
The embodiment of the application is not limited to a specific implementation manner of replacing the fixed identifier included in the sentence to be displayed with the first identifier. In one possible implementation, a start-stop position of a fixed logo of a sentence to be displayed is determined, and the fixed logo is replaced with the first logo based on the start-stop position of the fixed logo.
The metadata included in the replaced statement to be displayed is represented by the first identifier, so that the user can conveniently view the metadata.
B3: and sending the statement to be displayed to the client.
And sending the replaced statement to be displayed to the client so that the client can display the metadata to the user and the user can conveniently view the metadata represented by the first identifier.
In some scenarios, the user can modify the first identification of the metadata based on the need. The user can trigger an identification modification instruction for the metadata. The identity modification instruction includes a second identity. The second identifier is different from the first identifier. The embodiments of the present application do not limit the manner in which a user triggers an identification modification instruction for metadata. For example, the user inputs the second identifier in the modification control of the page display edited by the data model, and clicks the "confirm" button of the modification control to trigger the identifier modification instruction.
After the identifier modification instruction comprising the second identifier is acquired, the mapping relation between the first identifier and the fixed identifier is updated to be the mapping relation between the second identifier and the fixed identifier. In this way, after the sentence using the metadata represented by the second identifier is subsequently acquired, the second identifier included in the sentence can be replaced based on the mapping relationship between the second identifier and the fixed identifier.
Based on the processing method of the data processing statement provided by the above method embodiment, the embodiment of the application also provides a processing device of the data processing statement, and the processing device of the data processing statement will be described with reference to the accompanying drawings.
Referring to fig. 5, the diagram is a schematic structural diagram of a processing device for a data processing statement according to an embodiment of the present application. As shown in fig. 5, the processing apparatus of the data processing statement includes:
a first obtaining unit 501, configured to obtain a statement to be processed, determine metadata included in the statement to be processed, where the metadata is represented by a first identifier of the metadata;
a first replacing unit 502, configured to replace, based on a mapping relationship between a first identifier and a fixed identifier, the first identifier included in the statement to be processed with the fixed identifier to obtain a replaced statement to be processed, where the fixed identifier is a unique system identifier of the metadata;
and the storage unit 503 is configured to store the replaced pending statement, so as to call the replaced pending statement to execute a data processing step corresponding to the replaced pending statement.
In a possible implementation manner, the first replacing unit 502 is configured to replace the first identifier included in the statement to be processed with the fixed identifier, and includes:
the first replacing unit 502 is configured to identify a start-stop position of the first identifier in the statement to be processed; and replacing the first mark with the fixed mark based on the starting and ending positions.
In a possible implementation manner, the statement to be processed includes a plurality of metadata, and the first replacing unit 502 is configured to replace the first identifier with the fixed identifier based on the start-stop position, including:
the first replacing unit 502 is configured to sequentially perform, according to a replacing order, the following operations for the first identifier of each metadata included in the plurality of metadata: replacing the first identifier with a fixed identifier of the metadata based on the start-stop position of the first identifier of the metadata; wherein the replacement order is the order of the start-stop position of the first mark of each metadata from back to front in the statement to be processed.
In a possible implementation manner, the first obtaining unit 501 is configured to determine metadata included in the to-be-processed sentence, and includes:
the first obtaining unit 501 is configured to analyze the to-be-processed sentence by using a preset sentence grammar rule, so as to obtain metadata included in the to-be-processed sentence, where the sentence grammar rule is used to define a sentence composition structure included in the to-be-processed sentence and a connection relationship between each sentence composition structure, and the sentence composition structure includes metadata.
In one possible implementation, the apparatus further includes:
the generation unit is used for generating a statement to be displayed, the statement to be displayed comprises the metadata, the metadata is represented by the fixed identifier, and the statement to be displayed is generated after the data processing step is executed by calling the replaced statement to be processed and is used for realizing the display of the metadata;
a second replacing unit, configured to replace, based on a mapping relationship between the first identifier and the fixed identifier, the fixed identifier included in the statement to be displayed with the first identifier;
and the sending unit is used for sending the statement to be displayed to the client.
In one possible implementation, the apparatus further includes:
a second obtaining unit, configured to obtain an identifier modification instruction for the metadata, where the identifier modification instruction includes a second identifier;
and the updating unit is used for updating the mapping relation between the first identifier and the fixed identifier into the mapping relation between the second identifier and the fixed identifier.
Based on the processing method of the data processing statement provided by the embodiment of the method, the application also provides electronic equipment, which comprises the following steps: one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement a method of processing a data processing statement as described in any of the embodiments above.
Referring now to fig. 6, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present application is shown. The terminal devices in the embodiments of the present application may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant, personal digital assistants), PADs (portable android device, tablet computers), PMPs (Portable Media Player, portable multimedia players), vehicle-mounted terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs (televisions), desktop computers, and the like. The electronic device shown in fig. 6 is only an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 608 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present application are performed when the computer program is executed by the processing means 601.
The electronic device provided in the embodiment of the present application and the processing method of the data processing statement provided in the foregoing embodiment belong to the same inventive concept, and technical details not described in detail in the present embodiment may be referred to the foregoing embodiment, and the present embodiment has the same beneficial effects as the foregoing embodiment.
Based on the processing method of the data processing statement provided by the above method embodiment, the embodiment of the application provides a computer storage medium, on which a computer program is stored, where the program when executed by a processor implements the processing method of the data processing statement according to any one of the above embodiments.
It should be noted that the computer readable medium described in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, 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. In the present application, however, a computer-readable signal medium may include a data signal that propagates in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the processing method of the data processing statement.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The name of the unit/module is not limited to the unit itself in some cases, and, for example, the voice data acquisition module may also be described as a "data acquisition module".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system or device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant points refer to the description of the method section.
It should be understood that in this application, "at least one" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of processing a data processing statement, the method comprising:
acquiring a statement to be processed, and determining metadata included in the statement to be processed, wherein the metadata is represented by a first identifier of the metadata;
replacing the first identifier included in the statement to be processed with the fixed identifier based on a mapping relation between the first identifier and the fixed identifier to obtain a replaced statement to be processed, wherein the fixed identifier is a unique system identifier of the metadata;
and storing the replaced to-be-processed statement so as to call the replaced to-be-processed statement to execute the data processing step corresponding to the replaced to-be-processed statement.
2. The method of claim 1, wherein said replacing the first identifier included in the statement to be processed with the fixed identifier comprises:
identifying the start and stop positions of the first mark in the statement to be processed;
and replacing the first mark with the fixed mark based on the starting and ending positions.
3. The method of claim 2, wherein the statement to be processed includes a plurality of metadata, and wherein the replacing the first identifier with the fixed identifier based on the start-stop location comprises:
in order of replacement, the following operations are sequentially performed for the first identifier of each metadata included in the plurality of metadata:
replacing the first identifier with a fixed identifier of the metadata based on the start-stop position of the first identifier of the metadata;
wherein the replacement order is the order of the start-stop position of the first mark of each metadata from back to front in the statement to be processed.
4. The method of claim 1, wherein the determining metadata included in the statement to be processed comprises:
analyzing the statement to be processed by using a preset statement grammar rule to obtain metadata included in the statement to be processed, wherein the statement grammar rule is used for defining a statement composition structure included in the statement to be processed and connection relations among the statement composition structures, and the statement composition structure includes metadata.
5. The method according to any one of claims 1-4, further comprising:
generating a statement to be displayed, wherein the statement to be displayed comprises the metadata, the metadata is represented by the fixed identifier, and the statement to be displayed is generated after the data processing step is executed by calling the replaced statement to be processed and is used for realizing the display of the metadata;
replacing the fixed identifier included in the statement to be displayed with the first identifier based on the mapping relation between the first identifier and the fixed identifier;
and sending the statement to be displayed to the client.
6. The method according to any one of claims 1-4, further comprising:
acquiring an identification modification instruction aiming at the metadata, wherein the identification modification instruction comprises a second identification;
and updating the mapping relation between the first identifier and the fixed identifier into the mapping relation between the second identifier and the fixed identifier.
7. A processing apparatus for a data processing statement, the apparatus comprising:
the first acquisition unit is used for acquiring a statement to be processed, determining metadata included in the statement to be processed, wherein the metadata is represented by a first identifier of the metadata;
The first replacing unit is used for replacing the first identifier included in the statement to be processed with the fixed identifier to obtain a replaced statement to be processed based on a mapping relation between the first identifier and the fixed identifier, and the fixed identifier is a unique system identifier of the metadata;
the storage unit is used for storing the replaced to-be-processed statement so as to call the replaced to-be-processed statement to execute the data processing step corresponding to the replaced to-be-processed statement.
8. The apparatus of claim 7, wherein the first replacing unit configured to replace the first identifier included in the statement to be processed with the fixed identifier includes:
the first replacing unit is used for identifying the start-stop position of the first mark in the statement to be processed; and replacing the first mark with the fixed mark based on the starting and ending positions.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
10. A computer readable medium, characterized in that a computer program is stored thereon, wherein the program, when executed by a processor, implements the method according to any of claims 1-6.
CN202310855257.4A 2023-07-12 2023-07-12 Processing method, device and equipment of data processing statement and storage medium Pending CN117271550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310855257.4A CN117271550A (en) 2023-07-12 2023-07-12 Processing method, device and equipment of data processing statement and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310855257.4A CN117271550A (en) 2023-07-12 2023-07-12 Processing method, device and equipment of data processing statement and storage medium

Publications (1)

Publication Number Publication Date
CN117271550A true CN117271550A (en) 2023-12-22

Family

ID=89205156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310855257.4A Pending CN117271550A (en) 2023-07-12 2023-07-12 Processing method, device and equipment of data processing statement and storage medium

Country Status (1)

Country Link
CN (1) CN117271550A (en)

Similar Documents

Publication Publication Date Title
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN110780874B (en) Method and device for generating information
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN111143523B (en) Intention confirming method and device
CN111125064B (en) Method and device for generating database schema definition statement
CN111338944B (en) Remote Procedure Call (RPC) interface testing method, device, medium and equipment
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN113760948A (en) Data query method and device
CN110781658A (en) Resume analysis method and device, electronic equipment and storage medium
CN111597107A (en) Information output method and device and electronic equipment
CN111124541B (en) Configuration file generation method, device, equipment and medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN116860286A (en) Page dynamic update method, device, electronic equipment and computer readable medium
US20130151945A1 (en) Processing Published and Subscribed Events
CN112307061A (en) Method and device for querying data
CN117271550A (en) Processing method, device and equipment of data processing statement and storage medium
CN115034175A (en) Table data processing method, device, terminal and storage medium
CN110780898A (en) Page data upgrading method and device and electronic equipment
CN111143464A (en) Data acquisition method and device and electronic equipment
CN113609309B (en) Knowledge graph construction method and device, storage medium and electronic equipment
CN114428823B (en) Data linkage method, device, equipment and medium based on multidimensional variable expression
CN110908867B (en) Task completion judging method and device, storage medium and electronic equipment
CN111382389B (en) Multi-theme page generation method and device, electronic equipment and storage medium
CN116303529A (en) Object acquisition method, device, electronic equipment and computer readable medium
CN118094680A (en) Content generation method, device, medium, electronic device, and program product

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