CN105915389A - Data configuration and loading method and device - Google Patents

Data configuration and loading method and device Download PDF

Info

Publication number
CN105915389A
CN105915389A CN201610384280.XA CN201610384280A CN105915389A CN 105915389 A CN105915389 A CN 105915389A CN 201610384280 A CN201610384280 A CN 201610384280A CN 105915389 A CN105915389 A CN 105915389A
Authority
CN
China
Prior art keywords
data
client
server
excel
file
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
CN201610384280.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.)
Suzhou Lelin Wireless Information Technology Co Ltd
Original Assignee
Suzhou Lelin Wireless Information 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 Suzhou Lelin Wireless Information Technology Co Ltd filed Critical Suzhou Lelin Wireless Information Technology Co Ltd
Priority to CN201610384280.XA priority Critical patent/CN105915389A/en
Publication of CN105915389A publication Critical patent/CN105915389A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data configuration and loading method and device, and belongs to the field of data processing. The method comprises the steps of: writing data of a preset format into a client and a server; analyzing an EXCEL source configuration file, and storing the EXCEL file into a data structure; according to the written data of the preset format and the analyzed EXCEL source configuration file, generating client and server data; and loading the generated client and server data and storing the generated client and server data in a memory. According to the invention, codes and data files of the client and the server are automatically generated in the Excel form, the codes and data files are respectively loaded by the client and the server, and the files are in a binary compression format, so that the files are smaller than general files, the reading-writing speed is high, and the efficiency is improved; in addition, the client and the server use data analyzed by the same Excel source data, so that the data consistency of the client and the server is ensured.

Description

A kind of data configuration and the method and device of loading
Technical field
The invention belongs to data processing field, be specifically related to the method and device of data configuration and loading.
Background technology
Online game is called for short " network game ", also known as " game on line ".Refer to the Internet as transmission medium, With gaming operators server and subscriber computer as processing terminal, mutual with game client software for information Window aim at amusement, to lie fallow, exchange and obtain the individuality with sustainability just invented many People's game on line.
The most prevailing along with network game development, the interactivity of large-scale internet game and the raising of viscosity, right The complexity of games system requires more and more higher, and along with increasing of games system, each system is required for design Magnitude system.Traditional mode is the number system different for the design of each system.
The complexity of games system and various necessarily requirement to data improve, and traditional mode is for each The number system that system design is different, game developer is according to the number system provided, client and service Device end separately designs various implementations, needs the developer of client and server end jointly to decide through consultation fixed Justice interface, in addition it is also necessary to through complicated debugging test.The most both losing time, serious forgiveness is the lowest.Therefore, Often as the joint debugging of data loses time to affect the progress of whole project, thus lose the first chance in market.
Summary of the invention
In order to solve in prior art, developer is in interface defined in client and server end and debugging, unrestrained Time-consuming, serious forgiveness is low and inefficient problem.Embodiments provide a kind of data configuration and loading Method and device.Described technical scheme is as follows:
First aspect, a kind of data configuration and the method for loading, the method includes:
By in preset format data write client and server;
Resolve EXCEL source profile, EXCEL file is stored as data structure;
Preset format data according to write and the source profile of the EXCEL of parsing, generate client and clothes Business device data;
Client and the server data of generation are loaded and preserve to internal memory.
Concrete, resolve EXCEL source profile, EXCEL file be stored as data structure and include:
Read EXCEL file in class libraries;
EXCEL file is stored as data structure, wherein, the variable name of first row storage data structure;From Secondary series plays the instance data as variable name.
Concrete, generate client and server data includes: client data structure, client two are entered Data processed, server data structure and server binary data.
Wherein, client data structure, by header file corresponding to described parsing EXCEL file, is copied to Client engineering code structure compiles.
Second aspect, a kind of data configuration and the device of loading, this device includes:
Data read-write module, by preset format data write client and server;
Data resolution module, resolves EXCEL source profile, EXCEL file is stored as data structure;
Data generation module, according to the preset format data write and the source profile of the EXCEL of parsing, Generate client and server data;
Data load-on module, loads client and the server data of generation and preserves to internal memory.
Concrete, data resolution module includes:
Document reading unit, reads EXCEL file in class libraries;
Data storage cell, is stored as data structure by EXCEL file, wherein, and the first column storage knot The variable name of structure;As the instance data of variable name from secondary series.
Concrete, generate client and server data includes: client data structure, client two are entered Data processed, server data structure and server binary data.
Wherein, client data structure, by header file corresponding to described parsing EXCEL file, is copied to Client engineering code structure compiles.
The present invention automatically generates client and the code of service end and data file by Excel form, gives respectively Client and server loads, and this document is the binary system compressed format of this instrument self-defining, ratio one As file little, read or write speed is fast, and efficiency is promoted, and is same due to client and service end The data that part Excel source data parses, it is ensured that the data consistency of client and server end.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, institute in embodiment being described below The accompanying drawing used is needed to be briefly described, it should be apparent that, the accompanying drawing in describing below is only the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, Other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of data configuration and the method flow diagram of loading of embodiment of the present invention offer;
Fig. 2 is a kind of data configuration and the structural representation of loading of embodiment of the present invention offer.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the present invention Embodiment is described in further detail.
Fig. 1 is a kind of data configuration and the method flow of loading of embodiment of the present invention offer, specifically includes:
S101 is by preset format data write client and server;
Wherein, self-defining data form:
By providing the reading/writing method of this formatted data, this formatted data is write into client and server needs Binary file in.
S102 resolves EXCEL source profile, and EXCEL file is stored as data structure;
Concrete, resolve EXCEL source profile, EXCEL file be stored as data structure and include:
Read EXCEL file in class libraries;
EXCEL file is stored as data structure, wherein, the variable name of first row storage data structure;From Secondary series plays the instance data as variable name.
This instrument operates in windows platform, directly looks for the Microsoft Office office suite of Microsoft EXCEL.EXE provide class libraries, read Exce file, the table name of Excel table is read out storage Be the title of a data structure, first row title be stored as the variable name of member of this data structure, The data read out from secondary series are as the instance data of each member variable.
S103, according to the preset format data write and the source profile of the EXCEL of parsing, generates client End and server data;
Concrete, generate client and server data includes: client data structure, client two are entered Data processed, server data structure and server binary data.
Wherein, client data structure, by header file corresponding to described parsing EXCEL file, is copied to Client engineering code structure compiles.
Generate client data structure C++ code, according to the EXCEL data resolved, toward db.h C++ head Writing code inside file, each EXCEl file can generate the definition generation of a structured data type Code, table name reads out the title being stored as a data structure, first row title be stored as this number According to the variable name of the member of structure, first row name variable configures: Name:type, parses before ": " Name variable, below be data type of a variable, type is all the basic data type of C++, int, Std::stirng, bool etc..And automatically generate get and the set method of this variable, these steps be all by Instrument completes, it is not necessary to developer manually goes to write these codes, not only improves efficiency but also strengthen accuracy. The db.h C++ header file that complete of each Excel form analysis is finished writing copies client engineering code structure to In can pass through with direct compilation.
The data read out from secondary series are as the instance data of each member variable, according to the basic class of data Type stores and writes in file, saves as excelname.bin file, and copies the resource file of client to Folder is used for read loading.
It is similar to client, resolves Excel and generate the Erlang source code of the corresponding data structure of Erlang, And copy files to, in the corresponding file of server end, save as .erl file.
It is similar to client, resolves the binary data that Excel generates the Erlang of the corresponding data of Erlang File, and copy files to, in the corresponding file of server end, save as .hrl file.
Automatic code generating part, can generate the code of corresponding grammer according to different development languages.This reality Executing client in example uses C++, server to use Erlang, it is possible to use other language, Such as client uses java, C#, Lua, and server uses Golang, C, Python etc. language.
Client and the server data of generation are loaded and preserve to internal memory by S104.
cfgData*CCfgFile::load(const char*cfg_file)
General loading method, can load these data also client and server starts game when It is saved in internal memory and uses to game.
Fig. 2 is a kind of data configuration and the structural representation of loading of embodiment of the present invention offer, specifically includes:
21 data read-write module, by preset format data write client and server;
Wherein, self-defining data form:
By providing the reading/writing method of this formatted data, this formatted data is write into client and server needs Binary file in.
22 data resolution modules, resolve EXCEL source profile, and EXCEL file is stored as data knot Structure;
Concrete, data resolution module includes:
Document reading unit 221, reads EXCEL file in class libraries;
Data storage cell 222, is stored as data structure by EXCEL file, wherein, and first row storage number Variable name according to structure;As the instance data of variable name from secondary series.
This instrument operates in windows platform, directly looks for the Microsoft Office office suite of Microsoft EXCEL.EXE provide class libraries, read Exce file, the table name of Excel table is read out storage Be the title of a data structure, first row title be stored as the variable name of member of this data structure, The data read out from secondary series are as the instance data of each member variable.
23 data generation module, according to the source configuration literary composition of the preset format data write and the EXCEL of parsing Part, generates client and server data;
Concrete, generate client and server data includes: client data structure, client two are entered Data processed, server data structure and server binary data.
Wherein, client data structure, by header file corresponding to described parsing EXCEL file, is copied to Client engineering code structure compiles.
Generate client data structure C++ code, according to the EXCEL data resolved, toward db.h C++ head Writing code inside file, each EXCEl file can generate the definition generation of a structured data type Code, table name reads out the title being stored as a data structure, first row title be stored as this number According to the variable name of the member of structure, first row name variable configures: Name:type, parses before ": " Name variable, below be data type of a variable, type is all the basic data type of C++, int, Std::stirng, bool etc..And automatically generate get and the set method of this variable, these steps be all by Instrument completes, it is not necessary to developer manually goes to write these codes, not only improves efficiency but also strengthen accuracy. The db.h C++ header file that complete of each Excel form analysis is finished writing copies client engineering code structure to In can pass through with direct compilation.
The data read out from secondary series are as the instance data of each member variable, according to the basic class of data Type stores and writes in file, saves as excelname.bin file, and copies the resource file of client to Folder is used for read loading.
It is similar to client, resolves Excel and generate the Erlang source code of the corresponding data structure of Erlang, And copy files to, in the corresponding file of server end, save as .erl file.
It is similar to client, resolves the binary data that Excel generates the Erlang of the corresponding data of Erlang File, and copy files to, in the corresponding file of server end, save as .hrl file.
Automatic code generating part, can generate the code of corresponding grammer according to different development languages.This reality Executing client in example uses C++, server to use Erlang, it is possible to use other language, Such as client uses java, C#, Lua, and server uses Golang, C, Python etc. language.
24 data load-on modules, load client and the server data of generation and preserve to internal memory.
Wherein, client data structure, by header file corresponding to described parsing EXCEL file, is copied to Client engineering code structure compiles.
cfgData*CCfgFile::load(const char*cfg_file)
General loading method, can load these data also client and server starts game when It is saved in internal memory and uses to game.
The embodiment of the present invention automatically generates client and the code of service end and data file by Excel form, Load to client and server respectively, and this document be the binary system compressed format of this instrument self-defining, Less than generic-document, read or write speed is fast, and efficiency is promoted, and due to client and service end is The data parsed with a Excel source data, it is ensured that the data consistency of client and server end.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can be passed through Hardware completes, it is also possible to instructing relevant hardware by program and complete, described program can be stored in In a kind of computer-readable recording medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all the present invention's Within spirit and principle, any modification, equivalent substitution and improvement etc. made, should be included in the present invention's Within protection domain.

Claims (8)

1. a data configuration and the method for loading, it is characterised in that described method includes:
By in preset format data write client and server;
Resolve EXCEL source profile, EXCEL file is stored as data structure;
Preset format data according to said write and the source profile of the EXCEL of described parsing, generate visitor Family end and server data;
Client and the server data of described generation are loaded and preserve to internal memory.
Method the most according to claim 1, it is characterised in that described parsing EXCEL source configuration literary composition Part, is stored as data structure by EXCEL file, specifically includes:
Read EXCEL file in class libraries;
Described EXCEL file is stored as data structure, and wherein, first row stores the change of described data structure Amount name;As the instance data of described variable name from secondary series.
Method the most according to claim 1, it is characterised in that described generation client and server count According to including: client data structure, client binary data, server data structure and server Binary data.
Method the most according to claim 3, it is characterised in that described client data structure passes through The header file that described parsing EXCEL file is corresponding, is copied in client engineering code structure compiling.
5. a data configuration and the device of loading, it is characterised in that described device includes:
Data read-write module, by preset format data write client and server;
Data resolution module, resolves EXCEL source profile, EXCEL file is stored as data structure;
Data generation module, joins according to the source of the preset format data of said write and the EXCEL of described parsing Put file, generate client and server data;
Data load-on module, loads client and the server data of described generation and preserves to internal memory.
Device the most according to claim 5, it is characterised in that described data resolution module specifically includes:
Document reading unit, reads EXCEL file in class libraries;
Data storage cell, is stored as data structure by described EXCEL file, and wherein, first row stores institute State the variable name of data structure;As the instance data of described variable name from secondary series.
Device the most according to claim 5, it is characterised in that described generation client and server count According to including: client data structure, client binary data, server data structure and server Binary data.
Device the most according to claim 7, it is characterised in that described client data structure passes through The header file that described parsing EXCEL file is corresponding, is copied in client engineering code structure compiling.
CN201610384280.XA 2016-06-02 2016-06-02 Data configuration and loading method and device Pending CN105915389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610384280.XA CN105915389A (en) 2016-06-02 2016-06-02 Data configuration and loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610384280.XA CN105915389A (en) 2016-06-02 2016-06-02 Data configuration and loading method and device

Publications (1)

Publication Number Publication Date
CN105915389A true CN105915389A (en) 2016-08-31

Family

ID=56742022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610384280.XA Pending CN105915389A (en) 2016-06-02 2016-06-02 Data configuration and loading method and device

Country Status (1)

Country Link
CN (1) CN105915389A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885500A (en) * 2017-10-31 2018-04-06 惠州市蓝微新源技术有限公司 A kind of runtime environment generation method towards AUTOSAR software architectures
CN108959210A (en) * 2018-07-09 2018-12-07 网易(杭州)网络有限公司 A kind of method and device of file conversion
CN109582390A (en) * 2018-11-29 2019-04-05 上海哔哩哔哩科技有限公司 Game data generation method, device and storage medium based on exploitation allocation list
CN111984305A (en) * 2020-08-21 2020-11-24 腾讯科技(上海)有限公司 Application configuration method and device and computer equipment
CN112667314A (en) * 2020-12-23 2021-04-16 上海米哈游天命科技有限公司 Game engine editor starting method and device, electronic equipment and storage medium
CN114115839A (en) * 2022-01-28 2022-03-01 云账户技术(天津)有限公司 ORM code processing method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120317220A1 (en) * 2004-09-02 2012-12-13 At&T Intellectual Property I, L.P. Automated Messaging Tool
CN104038520A (en) * 2013-03-05 2014-09-10 北京畅游天下网络技术有限公司 Multi-version distributed resource management method and multi-version distributed resource management system
CN104516963A (en) * 2014-12-22 2015-04-15 云南大学 Excel data server and application thereof
CN105354072A (en) * 2015-10-23 2016-02-24 北京京东尚科信息技术有限公司 Code generation method based on Eclipse platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120317220A1 (en) * 2004-09-02 2012-12-13 At&T Intellectual Property I, L.P. Automated Messaging Tool
CN104038520A (en) * 2013-03-05 2014-09-10 北京畅游天下网络技术有限公司 Multi-version distributed resource management method and multi-version distributed resource management system
CN104516963A (en) * 2014-12-22 2015-04-15 云南大学 Excel data server and application thereof
CN105354072A (en) * 2015-10-23 2016-02-24 北京京东尚科信息技术有限公司 Code generation method based on Eclipse platform

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885500A (en) * 2017-10-31 2018-04-06 惠州市蓝微新源技术有限公司 A kind of runtime environment generation method towards AUTOSAR software architectures
CN107885500B (en) * 2017-10-31 2021-05-18 惠州市蓝微新源技术有限公司 Runtime environment generation method oriented to AUTOSAR software architecture
CN108959210A (en) * 2018-07-09 2018-12-07 网易(杭州)网络有限公司 A kind of method and device of file conversion
CN109582390A (en) * 2018-11-29 2019-04-05 上海哔哩哔哩科技有限公司 Game data generation method, device and storage medium based on exploitation allocation list
CN111984305A (en) * 2020-08-21 2020-11-24 腾讯科技(上海)有限公司 Application configuration method and device and computer equipment
CN111984305B (en) * 2020-08-21 2023-08-08 腾讯科技(上海)有限公司 Application configuration method and device and computer equipment
CN112667314A (en) * 2020-12-23 2021-04-16 上海米哈游天命科技有限公司 Game engine editor starting method and device, electronic equipment and storage medium
CN114115839A (en) * 2022-01-28 2022-03-01 云账户技术(天津)有限公司 ORM code processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN105915389A (en) Data configuration and loading method and device
Beizer Black-box testing: techniques for functional testing of software and systems
US8707263B2 (en) Using a DSL for calling APIS to test software
US9465718B2 (en) Filter generation for load testing managed environments
US7509655B2 (en) Integration of workflow and rules
CN112074817A (en) Execution control with cross-level trace mapping
US20240045850A1 (en) Systems and methods for database orientation transformation
US10592220B2 (en) Metadata-driven binding of converted source code to original source code
DE112008000242T5 (en) A method of creating a cross-platform program and middleware platform engine therefor
US9189213B2 (en) Automatic configuration of project system from project capabilities
CN107832059A (en) Code static analysis method and device based on Makefile
CN102929680A (en) Method, device and system for converting a testing and test control notation version 3 (TTCN-3) script into a Java source code
US10809985B2 (en) Instrumenting program code
US9563412B2 (en) Statically extensible types
Butler et al. Maintaining interoperability in open source software: A case study of the Apache PDFBox project
CN117112060A (en) Component library construction method and device, electronic equipment and storage medium
CN110795091A (en) Modular routing decoupling method, storage medium, electronic device and system
US8762976B2 (en) Static extensibility models with dynamic languages and scripts
US20180260197A1 (en) Extensible instrumentation
US9098317B2 (en) Optional retargeting of library references
CN115022312A (en) Method and device for realizing multiple intelligent contract engines, electronic equipment and storage medium
CN110737431B (en) Software development method, development platform, terminal device and storage medium
KR100846203B1 (en) Method for generating mobile application and record media recorded program for realizing the same
US7571428B2 (en) Reliability contracts
CN112685049B (en) JAVA byte code compiling method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160831