CN118426810A - Data writing method, device, equipment and computer readable storage medium - Google Patents

Data writing method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN118426810A
CN118426810A CN202410741161.XA CN202410741161A CN118426810A CN 118426810 A CN118426810 A CN 118426810A CN 202410741161 A CN202410741161 A CN 202410741161A CN 118426810 A CN118426810 A CN 118426810A
Authority
CN
China
Prior art keywords
target
writing
file
field
data
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
CN202410741161.XA
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.)
OP Retail Suzhou Technology Co Ltd
Original Assignee
OP Retail Suzhou 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 OP Retail Suzhou Technology Co Ltd filed Critical OP Retail Suzhou Technology Co Ltd
Priority to CN202410741161.XA priority Critical patent/CN118426810A/en
Publication of CN118426810A publication Critical patent/CN118426810A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data writing method, a device, equipment and a computer readable storage medium, which are applied to the technical field of data processing and comprise the following steps: importing a target writing file or a target field into a data writing tool to write data; in the writing process by using a data writing tool, determining whether a target writing address of a target writing file or a target field is consistent with a local address stored by a current code; if the target write address is consistent with the local address where the current code is stored, updating the code file of the corresponding version based on the target write file or the target field, wherein the code file is used for generating the front-end display page of the corresponding version. Compared with the current requirement of manually writing data by a user, the method and the device can automatically write the target writing data to the target position according to the target writing file and the target field by using the data writing tool, and the efficiency of data writing can be improved and the experience of the user can be improved because manual operation is not required.

Description

Data writing method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data writing method, apparatus, device, and computer readable storage medium.
Background
With the increasing complexity of software development, version control plays a critical role in software engineering. In order to update software, the current technical means mainly adopts a manual writing mode to write codes corresponding to files in each folder one by one.
Due to the way in which the update codes are written one by one manually, there are write inefficiencies and inefficiencies. Therefore, currently, there is a technical problem that data writing efficiency is low when updating codes.
Disclosure of Invention
Accordingly, the present invention is directed to a method, apparatus, device and computer readable storage medium for writing data, which solve the technical problem of low data writing efficiency in the prior art.
In order to solve the above technical problems, the present invention provides a data writing method, including:
Importing a target writing file or a target field into a data writing tool to write data; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field;
In the writing process by using the data writing tool, determining whether the target writing address of the target writing file or the target field is consistent with the local address stored by the current code;
And if the target write address is consistent with the local address where the current code is stored, updating a code file of a corresponding version based on the target write file or the target field, wherein the code file is used for generating a front-end display page of the corresponding version.
Optionally, updating the code file of the corresponding version based on the target field includes:
Searching the position of a field to be updated corresponding to the target field;
updating the target field into the code file based on the position of the field to be updated.
Optionally, updating the code file of the corresponding version based on the target write file includes:
Matching the corresponding position to be updated by using a key value or a Chinese field according to the target writing file;
and modifying the corresponding target field to be modified by utilizing the target writing field in the target writing file according to the position to be updated.
Optionally, when there are multiple release columns in the target write file, the method includes:
determining whether a multilingual file exists;
When present, directly adding the paraphrasing fields corresponding to the plurality of version paraphrasing columns to corresponding positions of the multi-language file;
when not present, a target multi-language file is created and paraphrasing fields corresponding to the plurality of version paraphrasing columns are added to corresponding locations of the multi-language file.
Optionally, the method further comprises:
code files of different versions are generated or updated based on the plurality of version paraphrasing columns to update front-end display pages of corresponding versions.
Optionally, after the target write file or the target field updates the code file of the corresponding version, the method further includes:
running the updated codes to obtain running results;
determining whether the software is updated successfully according to the operation result;
When the updating is determined to be successful, determining to receive software problem feedback sent by a user within a preset time, and receiving operation error information;
When it is determined that the update fails, an error code is analyzed.
Optionally, when the target write address is inconsistent with the local address, the method includes:
Determining that the current file is not modified, and determining all inconsistent addresses;
And sending prompt information according to all inconsistent addresses.
The application also provides a data writing device, comprising:
The writing data importing module is used for importing a target writing file or a target field into a data writing tool to write data; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field;
The address consistency judging module is used for determining whether the target writing address of the target writing file or the target field is consistent with the local address stored by the current code in the writing process by utilizing the data writing tool;
and the code file updating module is used for updating the code file of the corresponding version based on the target writing file or the target field if the target writing address is consistent with the local address where the current code is stored, and the code file is used for generating a front-end display page of the corresponding version.
The application also provides a data writing device, comprising:
a memory for storing a computer program;
and a processor for executing the computer program to implement the steps of the data writing method as described above.
The present application also provides a computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of the data writing method as described above.
Therefore, the application performs data writing by importing the target writing file or the target field into the data writing tool; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field; in the writing process by using a data writing tool, determining whether a target writing address of a target writing file or a target field is consistent with a local address stored by a current code; if the target write address is consistent with the local address where the current code is stored, updating the code file of the corresponding version based on the target write file or the target field, wherein the code file is used for generating the front-end display page of the corresponding version. Compared with the manual writing required by the current user, the method and the device can automatically write the target writing field to the target position according to the target writing file by using the data writing tool, and improve the data writing efficiency.
In addition, the invention also provides a data writing device, equipment and a computer readable storage medium, which also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a data writing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data writing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data writing interface according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another data writing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a data writing device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data writing device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a data writing method according to an embodiment of the invention. The method may include:
s101, importing a target writing file or a target field into a data writing tool to write data; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field.
The invention relates to the technical field of Nodejs. Js is a JavaScript (lightweight, interpreted programming language) runtime environment based on a Chrome V8 engine (high performance engine) that allows JavaScript code to be executed on the server side. The target write file in this embodiment is a file obtained by searching and updating the searched content. The content written with the data writing tool in this embodiment may be a single target field or may also be a target write file including a plurality of target fields. The write address in this embodiment is an address determined by the target write file to be written, and the local address is an address where the folder is actually located. The embodiment is not limited to a specific write file, and for example, the write file in the embodiment may be a JSON file, or the write file in the embodiment may also be an Excel file. The write field in this embodiment is a field that is determined to be written according to the write file. It can be understood that the data writing tool in this embodiment can retrieve the target retrieval type (object, array, character string, chinese) corresponding to the current item (module responsible for itself) within 1 second, and automatically generate Excel for delivery to the downstream. And delivering the translated Excel (equivalent to a dictionary) downstream, uploading the dictionary into a tool, then starting writing, and automatically generating a file to a target position.
It should be further noted that, in order to improve the translation efficiency, before the data writing is performed by the data writing tool that imports the target writing file or the target field, the method may further include:
s1011, obtaining a field to be translated;
s1012, translating the field to be translated by utilizing a system internal file;
S1013, determining whether the field to be translated is translated successfully;
S1014, when the translation of the field to be translated is successful, determining to store the field to be translated as a target write field to the target write file;
S1015, returning to the acquisition of the field to be translated when the field to be translated fails to be translated, and determining to translate by using an external translation tool.
According to the embodiment, before data writing, translation work is automatically performed, so that when content needs to be translated, the content translated in advance is used as a dictionary, and the efficiency of subsequent translation is improved. The system content file in this embodiment is a source file containing fields to be translated, or a translation memory file storing a Translation Memory (TM) and a vocabulary library. These files may help the translator complete the translation task faster and more accurately. For example, if the field to be translated is a piece of text, then the system internal file may be the source file of the piece of text, such as a Word document, a PDF file, and so on. If the field to be translated is a term of art or a commonly used phrase, the internal file of the system may be a translation memory file storing the term or phrase. The external translation tool in this embodiment may be a large language model, and the following steps may be taken to translate using the large language model: selecting an appropriate language model: first, a large language model is selected that is appropriate for the translation task. This model should be able to understand and generate text in multiple languages. For example, google's neural machine translation System (GNMT) or Facebook's AI translation System, etc. Preparing data: data sets containing code annotations are collected, the data sets containing code annotations in a source language and corresponding target language translations. Ensures high data quality and covers multiple programming languages and annotation styles. Data preprocessing: the data is cleaned and extraneous information, such as the code itself, is removed, leaving only the annotated part and its translations. The data set is then divided into a training set, a validation set and a test set. Training a model: the language model is trained using a training set. During the training process, the model will learn how to translate annotations in the source language into annotations in the target language. Model evaluation: the model is evaluated using the validation set and the test set to check the accuracy and fluency of the translation. And adjusting model parameters according to the evaluation result to improve the translation quality. Deployment model: the trained model is deployed to an actual application, such as integration into an IDE or code editor. The user may invoke the translation function through a plug-in or toolbar. Continuous optimization: and collecting user feedback and new data, continuously optimizing the model, and improving the translation accuracy and user experience.
S102, in the writing process by using the data writing tool, determining whether the target writing address of the target writing file or the target field is consistent with the local address stored by the current code.
This embodiment needs to ensure that the target write address and the local address are consistent to ensure the accuracy of the write field write location.
And S103, if the target write address is consistent with the local address where the current code is stored, updating the code file of the corresponding version based on the target write file or the target field, wherein the code file is used for generating the front-end display page of the corresponding version.
The embodiment is not limited to a particular type of modification. For example, the modification in this embodiment may be an add write, or the modification in this embodiment may be a field prior to the update. This embodiment may include, when the target write address is not consistent with the local address: determining that the current file is not modified, and determining all inconsistent addresses; and sending prompt information according to all inconsistent addresses. It can be appreciated that address problems are solved by determining inconsistent addresses, thereby accurately locating the address where the error occurred.
It should be further noted that updating the code file of the corresponding version based on the target field may include: searching the position of a field to be updated corresponding to the target field; updating the target field into the code file based on the location of the field to be updated. The embodiment updates the corresponding code file by searching the position of the field to be updated corresponding to the target field. It will be appreciated that this embodiment may directly replace the target field with the corresponding field to be updated, or it may also directly write the target field to a blank location (the location of the field to be updated).
It should be further noted that, to improve the update efficiency, the updating the code file of the corresponding version based on the target write file may include: matching the corresponding position to be updated by using a key value or a Chinese field according to the target writing file; and modifying the corresponding target field to be modified by utilizing the target writing field in the target writing file according to the position to be updated. When the embodiment is used for writing by utilizing the target writing file, the position to be updated can be determined according to the key value or the Chinese field, and the accuracy of determining the position to be updated is ensured, so that the target writing field is accurately utilized for modifying the target field to be modified.
It should be further noted that, to improve the update efficiency of each software version, when there are multiple release columns of the version in the target write file, it may include: determining whether a multilingual file exists; when the paraphrasing fields exist, the paraphrasing fields corresponding to the paraphrasing columns of the versions are directly added to the corresponding positions of the multi-language file; when not present, a target multilingual file is created and paraphrasing fields corresponding to the plurality of version paraphrasing columns are added to corresponding locations of the multilingual file. In this embodiment the tool can internally check if there is a corresponding multilingual file under the specific directory. The multi-language file is used as a necessary file for internationally using software inside the project. The plurality of version paraphrasing columns in this embodiment refers to columns of the plurality of version paraphrasing fields. The embodiment is not limited to a particular type of paraphrasing field in the plurality of version paraphrasing columns. For example, the paraphrasing field in this embodiment may be traditional Chinese; or the paraphrase field in this embodiment may also be an english version; or the paraphrase field in this embodiment may also be a indonesian version. The multilingual file in this embodiment refers to a localized resource file for implementing multilingual support for a web site or application. In developing multi-lingual supported applications, there are typically the following steps and concepts: language package: the developer creates a language pack containing all the text information in the application. These language packs are typically categorized by different languages, each language pack containing a series of key-value pairs, the keys being an identification of text, the values being text content in the corresponding language. DOM replacement: when libraries such as native JavaScript or jQuery (quick and compact JavaScript library) are used, multi-language switching can be achieved by manipulating DOM elements. This typically involves replacing text content on the page with a string in the corresponding language pack. Parameter calling: for the non-content character strings to be displayed, the character strings in the corresponding language packs can be called in a parameter mode. Thus, when the user switches languages, the multi-language display of the content can be realized by only changing parameters. Plug-in use: sometimes developers will utilize existing plug-ins to simplify the process of multi-lingual implementation. These plug-ins may provide higher level functionality such as automatic processing language switching, language package management, etc. Example code: some projects may provide multilingual Demo example code for reference and learning by a developer. These codes may help understand the specific methods and flows of the multi-lingual implementation. In general, implementing multi-language support is a process involving multiple technologies and policies, the key being to efficiently organize and manage resource files in different languages and to ensure a fast response when a user switches languages. The corresponding location in this embodiment refers to an entry or field corresponding to a specific key in a multi-language file, and in order to ensure that information in resource files of different language versions can correspond to each other, the consistency of the keys must be maintained, the keys should remain unchanged regardless of changes in language, and in resource files of each language, the value corresponding to the same key needs to be translated into the corresponding language. According to the embodiment, the target field to be modified is modified into a plurality of version definition fields, so that the multilingual of the software code is realized, and the updating efficiency of each software version is improved.
It should be further noted that, to improve the update efficiency of the front-end display page, after obtaining the plurality of release columns, the method may further include: code files of different versions are generated or updated based on the plurality of version paraphrasing columns to update front-end display pages of corresponding versions. The embodiment can directly generate or update the code files of different versions according to the paraphrasing columns of the plurality of versions, thereby updating the front-end display page by using the code files and improving the updating efficiency of the front-end display page.
It should be further noted that, in order to improve accuracy of the software code update, after the target write file or the target field updates the code file of the corresponding version, the method may further include: running the updated codes to obtain running results; determining whether the software is updated successfully according to the operation result; when the updating is determined to be successful, determining to receive software problem feedback sent by a user within a preset time, and receiving operation error information; when it is determined that the update fails, an error code is analyzed. In the embodiment, after updating the code by using the target writing field, the updated code is operated to obtain an operation result, so that whether the software is successfully updated or not can be determined according to the operation result, and when the updating fails, the failure reason is analyzed in time to update the software again, and the accuracy of updating the software code is improved.
The data writing method provided by the embodiment of the application can comprise the following steps: s101, importing a target writing file or a target field into a data writing tool to write data; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field; s102, determining whether a target writing address of a target writing file or a target field is consistent with a local address stored by a current code in a writing process by using a data writing tool; and S103, if the target write address is consistent with the local address where the current code is stored, updating the code file of the corresponding version based on the target write file or the target field, wherein the code file is used for generating the front-end display page of the corresponding version. Compared with the manual writing required by the current user, the method and the device can automatically write the target writing field to the target position according to the target writing file by using the data writing tool, and improve the data writing efficiency. In addition, before data writing, the embodiment automatically performs translation work, ensures that when the content needs to be translated, the content translated in advance is used as a dictionary, and improves the efficiency of subsequent translation; in addition, the embodiment can accurately position the address with error by determining the inconsistent address, thereby solving the address problem; in addition, when the embodiment writes by using the target writing file, the position to be updated can be determined according to the key value or the Chinese field, so that the accuracy of determining the position to be updated is ensured, and the target writing field is accurately utilized to modify the target field to be modified; in addition, according to the embodiment, the target field to be modified is modified into a plurality of version definition fields, so that the multilingual of the software code is realized, and the updating efficiency of each software version is improved; in addition, the embodiment can determine whether the software is updated successfully according to the operation result, and when the software is updated successfully, the failure reason is analyzed in time so as to update the software again, thereby improving the accuracy of updating the software code.
For better understanding of the present invention, please refer to fig. 2, fig. 2 is a flowchart illustrating a data writing method according to an embodiment of the present invention, which may include:
S201, acquiring a target table file; the target table file is a table file of a target field, an update field key value, a code type, a folder path and a position of the target field.
The target table file in this embodiment corresponds to the target write file above. The embodiment does not limit the number of target fields. For example, the target field in this embodiment may be single or multiple.
S202, writing the target Excel file according to a writing logic method; the writing logic method is used for determining whether a folder path in the target Excel file is consistent with a path stored by the current code.
The write logic method in this embodiment is a write logic method in a data writing tool. The initial interface of writing in this embodiment is shown in fig. 3, and fig. 3 is a schematic diagram of a data writing interface provided in an embodiment of the present invention, where it can be seen that, when writing data, a local address, a key field, a writing address, and writing data are required. The key field is another searching mode, and the premise of realizing the writing of all the fields is that the text in the page is selected during searching.
S203, if the target field is consistent, the target field is modified into an updated field according to the key value.
S204, if the positions are inconsistent, indicating that the folders are inconsistent, and not modifying.
S205, it is determined whether a multilingual JSON file exists.
S206, when the content exists, adding the content to the multilingual JSON file.
S207, if the JSON file does not exist, generating a multi-language JSON file for writing.
When the embodiment writes data, a row of second version paraphrasing fields corresponding to the target fields can be directly added, after filling, the modified form file (target Excel file) is imported to the target path for writing data, and a new corresponding file code or partial file with the second version paraphrasing is generated according to the updated form file. When updating is performed for specific target field or several target fields, the updated field content of the field to be updated is stored in the update column of the table file to complete the table update by inputting the field to be updated and searching the position of the field to be updated in the table file. And updating the contents of corresponding fields in the software codes/files of the multiple versions according to the updated table.
For better understanding of the present invention, please refer to fig. 4, fig. 4 is a flowchart illustrating another data writing method according to an embodiment of the present invention, which may include:
step 1: and obtaining Excel obtained through translation.
And 2, analyzing the uploaded Excel, and converting the Excel into an array.
The embodiment can save an Excel file as a JSON file, and specify the saved content according to the content in the Excel, namely, according to the file position in the Excel obtained by previous retrieval, the Chinese under the file and other multilingual columns. The array in this embodiment corresponds to a dictionary that facilitates multi-language searching, and is used internally by the tool.
And 3, taking the file path in the Excel as a target path.
And 4, matching the corresponding file by using Chinese in Excel as a key value.
And 5, when successful matching is determined, replacing the key value by the key value corresponding to Chinese, and realizing data writing.
It will be appreciated that there is only one key (key value). If there is a key, namely test_my, in other language files, the internationalization can be realized by switching languages by using the test_my, i'm is Chinese', the test_my is 'I AM ENGLISH' … …, and the switching is realized inside the project.
The following describes a data writing device according to an embodiment of the present invention, and the data writing device described below and the data writing method described above may be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a data writing device according to an embodiment of the present invention, which may include:
A write data import module 100, configured to import a target write file or a target field into a data write tool for data writing; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field;
The address consistency judging module 200 is configured to determine whether a target write address of the target write file or the target field is consistent with a local address stored in a current code in a writing process using the data writing tool;
And the code file updating module 300 is configured to update, if the target write address is consistent with the local address where the current code is stored, a code file of a corresponding version based on the target write file or the target field, where the code file is used to generate a front end display page of the corresponding version.
Further, based on the above embodiment, the code file updating module 300 may include:
the position searching unit of the field to be updated is used for searching the position of the field to be updated corresponding to the target field;
And the target field writing unit is used for updating the target field into the code file based on the position of the field to be updated.
Further, based on any of the above embodiments, the code file updating module 300 may include:
The device comprises a to-be-updated position determining unit corresponding to a field in a target writing file, and a to-be-updated position determining unit, wherein the to-be-updated position determining unit is used for matching the corresponding to the to-be-updated position by utilizing a key value or a Chinese field according to the target writing file;
And the target writing file modification unit is used for modifying the corresponding target field to be modified by utilizing the target writing field in the target writing file according to the position to be updated.
Further, based on the above embodiment, the above data writing device may further include:
The multi-language file judging module is used for determining whether a multi-language file exists or not;
An adding module, configured to directly add, when present, paraphrasing fields corresponding to the plurality of version paraphrasing columns to corresponding positions of the multilingual file;
And the multilingual file creation module is used for creating a target multilingual file when the multilingual file does not exist, and adding the paraphrasing fields corresponding to the paraphrasing columns of the multiple versions to the corresponding positions of the multilingual file.
Further, based on the above embodiment, the above data writing device may further include:
and the front-end display page updating module is used for generating or updating code files of different versions based on the version paraphrasing columns so as to update the front-end display page of the corresponding version.
Further, based on the above embodiment, the above data writing device may further include:
the operation result determining module is used for operating the updated codes to obtain operation results;
The success or not updating determining module is used for determining whether the software is successfully updated or not according to the running result;
The feedback module is used for determining that the software problem feedback sent by the user is received in the preset time and receiving the running error information when the update is determined to be successful;
and the analysis module is used for analyzing the error code when the update failure is determined.
Further, based on the above embodiment, the above data writing device may further include:
the inconsistent address determining module is used for determining that the current file is not modified and determining all inconsistent addresses;
And the prompt information determining module is used for sending prompt information according to all inconsistent addresses.
The data writing device provided by the embodiment of the application can comprise: a write data import module 100, configured to import a target write file or a target field into a data write tool for data writing; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field; the address consistency judging module 200 is configured to determine whether a target write address of the target write file or the target field is consistent with a local address stored in a current code in a writing process using the data writing tool; and the code file updating module 300 is configured to update, if the target write address is consistent with the local address where the current code is stored, a code file of a corresponding version based on the target write file or the target field, where the code file is used to generate a front end display page of the corresponding version. Compared with the manual writing required by the current user, the method and the device can automatically write the target writing field to the target position according to the target writing file by using the data writing tool, and improve the data writing efficiency. In addition, before data writing, the embodiment automatically performs translation work, ensures that when the content needs to be translated, the content translated in advance is used as a dictionary, and improves the efficiency of subsequent translation; in addition, the embodiment can accurately position the address with error by determining the inconsistent address, thereby solving the address problem; in addition, when the embodiment writes by using the target writing file, the position to be updated can be determined according to the key value or the Chinese field, so that the accuracy of determining the position to be updated is ensured, and the target writing field is accurately utilized to modify the target field to be modified; in addition, according to the embodiment, the target field to be modified is modified into a plurality of version definition fields, so that the multilingual of the software code is realized, and the updating efficiency of each software version is improved; in addition, the embodiment can determine whether the software is updated successfully according to the operation result, and when the software is updated successfully, the failure reason is analyzed in time so as to update the software again, thereby improving the accuracy of updating the software code.
The following describes a data writing device provided in an embodiment of the present invention, where the data writing device described below and the data writing method described above may be referred to correspondingly.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a data writing device according to an embodiment of the present invention, which may include:
A memory 10 for storing a computer program;
a processor 20 for executing a computer program to implement the data writing method described above.
The memory 10, the processor 20, and the communication interface 30 all communicate with each other via a communication bus 40.
In the embodiment of the present invention, the memory 10 is used for storing one or more programs, the programs may include program codes, the program codes include computer operation instructions, and in the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
Importing a target writing file or a target field into a data writing tool to write data; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field;
in the writing process by using a data writing tool, determining whether a target writing address of a target writing file or a target field is consistent with a local address stored by a current code;
If the target write address is consistent with the local address where the current code is stored, updating the code file of the corresponding version based on the target write file or the target field, wherein the code file is used for generating the front-end display page of the corresponding version.
In one possible implementation, the memory 10 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, memory 10 may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic tasks as well as handling hardware-based tasks.
The processor 20 may be a central processing unit (Central Processing Unit, CPU), an asic, a dsp, a fpga or other programmable logic device, and the processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10.
The communication interface 30 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 6 does not limit the data writing device in the embodiment of the present invention, and the data writing device may include more or fewer components than those shown in fig. 6 or may be combined with some components in practical applications.
The following describes a computer-readable storage medium provided in an embodiment of the present invention, and the computer-readable storage medium described below and the data writing method described above may be referred to correspondingly.
The present invention also provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the data writing method described above.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Finally, it is further noted that, in this document, 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.
The foregoing has described in detail a data writing method, apparatus, device and computer readable storage medium provided by the present invention, and specific examples have been applied to illustrate the principles and embodiments of the present invention, and the above examples are only used to help understand the method and core idea of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1.A data writing method, comprising:
Importing a target writing file or a target field into a data writing tool to write data; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field;
In the writing process by using the data writing tool, determining whether the target writing address of the target writing file or the target field is consistent with the local address stored by the current code;
And if the target write address is consistent with the local address where the current code is stored, updating a code file of a corresponding version based on the target write file or the target field, wherein the code file is used for generating a front-end display page of the corresponding version.
2. The data writing method according to claim 1, wherein updating the code file of the corresponding version based on the target field includes:
Searching the position of a field to be updated corresponding to the target field;
updating the target field into the code file based on the position of the field to be updated.
3. The data writing method according to claim 1, wherein updating the code file of the corresponding version based on the target write file includes:
Matching the corresponding position to be updated by using a key value or a Chinese field according to the target writing file;
and modifying the corresponding target field to be modified by utilizing the target writing field in the target writing file according to the position to be updated.
4. The data writing method according to claim 3, wherein when there are a plurality of version paraphrasing columns in the target write file, comprising:
determining whether a multilingual file exists;
When present, directly adding the paraphrasing fields corresponding to the plurality of version paraphrasing columns to corresponding positions of the multi-language file;
when not present, a target multi-language file is created and paraphrasing fields corresponding to the plurality of version paraphrasing columns are added to corresponding locations of the multi-language file.
5. The data writing method according to claim 4, further comprising:
code files of different versions are generated or updated based on the plurality of version paraphrasing columns to update front-end display pages of corresponding versions.
6. The data writing method according to claim 1, further comprising, after the target write file or the target field updates the code file of the corresponding version:
running the updated codes to obtain running results;
determining whether the software is updated successfully according to the operation result;
When the updating is determined to be successful, determining to receive software problem feedback sent by a user within a preset time, and receiving operation error information;
When it is determined that the update fails, an error code is analyzed.
7. The data writing method according to claim 1, wherein when the target write address is inconsistent with the local address, comprising:
Determining that the current file is not modified, and determining all inconsistent addresses;
And sending prompt information according to all inconsistent addresses.
8. A data writing apparatus, comprising:
The writing data importing module is used for importing a target writing file or a target field into a data writing tool to write data; the data writing tool is used for automatically writing according to the writing file, the writing address, the local address and the writing field;
The address consistency judging module is used for determining whether the target writing address of the target writing file or the target field is consistent with the local address stored by the current code in the writing process by utilizing the data writing tool;
and the code file updating module is used for updating the code file of the corresponding version based on the target writing file or the target field if the target writing address is consistent with the local address where the current code is stored, and the code file is used for generating a front-end display page of the corresponding version.
9. A data writing apparatus, comprising:
a memory for storing a computer program;
processor for executing the computer program to implement the steps of the data writing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, implements the steps of the data writing method according to any of claims 1 to 7.
CN202410741161.XA 2024-06-07 2024-06-07 Data writing method, device, equipment and computer readable storage medium Pending CN118426810A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410741161.XA CN118426810A (en) 2024-06-07 2024-06-07 Data writing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410741161.XA CN118426810A (en) 2024-06-07 2024-06-07 Data writing method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN118426810A true CN118426810A (en) 2024-08-02

Family

ID=92324383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410741161.XA Pending CN118426810A (en) 2024-06-07 2024-06-07 Data writing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN118426810A (en)

Similar Documents

Publication Publication Date Title
Aghajani et al. Software documentation issues unveiled
CN108762743B (en) Data table operation code generation method and device
US11188308B2 (en) Interactive code editing
CN111507086B (en) Automatic discovery of translated text locations in localized applications
US20110179073A1 (en) Method for Localizing Text in a Software Application
CN113076133B (en) Deep learning-based Java program internal annotation generation method and system
US20110144972A1 (en) Method and System for Generating a Localized Software Product
US8364696B2 (en) Efficient incremental parsing of context sensitive programming languages
US9141344B2 (en) Hover help support for application source code
US11301643B2 (en) String extraction and translation service
Tufano et al. Methods2Test: A dataset of focal methods mapped to test cases
CN111656453A (en) Hierarchical entity recognition and semantic modeling framework for information extraction
CN102364437A (en) Multi-language site development system and implementation method thereof
CN117010345A (en) Method, device, equipment and storage medium for generating function document
CN112799718A (en) Enumerated document generation method and device, electronic equipment and storage medium
CN109947711B (en) Automatic multi-language file management method in IOS project development process
CN101261633A (en) Electronic translation method and system based on engineering
CN111443979B (en) Document processing method, device, computer equipment and storage medium
CN110275712B (en) Text replacement method, device and equipment
CN107077365B (en) Selectively loading precompiled headers and/or portions thereof
CN118426810A (en) Data writing method, device, equipment and computer readable storage medium
Lopez-Rojas OMCCp: A MetaModelica Based Parser Generator Applied to Modelica
CN118034777B (en) FTTR-based log management and version control method, FTTR-based log management and version control device, FTTR-based log management and version control equipment and medium
CN110618809B (en) Front-end webpage input constraint extraction method and device
WO2017142546A1 (en) Natural language programming tool

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