A data processing method, device and storage medium
Patent Information
- Application Number
- CN202110502818.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-08
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-05-08
AI Technical Summary
[0003]在对业务设备进行权限管控时,如果使用窄接口的方式,需要给不同业务设备开放不同的接口,而由于不同业务的更新诉求与未来扩展可能性不同,导致无法对更新接口进行收拢合并,也会使接口数随着业务的复杂度提升而越来越多,同时在对待更新字段进行权限校验时,也需要检查每一个接口是否包含待更新字段,并作出同样的修改,容易遗漏和出错
[0015]相应地,本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述任一可能实现方式所述的数据处理方法。
Smart Images

Figure CN115309416B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus and storage medium. Background Technology
[0002] Data is an inevitable byproduct of any business. If there is no access control for business devices during updates, and each business device can modify the data, then data security will not be guaranteed.
[0003] When managing access to business devices, using a narrow interface approach requires opening different interfaces for different devices. However, due to varying update needs and future expansion possibilities across different businesses, it's impossible to consolidate and merge update interfaces. This leads to a rapid increase in the number of interfaces as business complexity grows. Furthermore, when validating permissions for fields to be updated, each interface needs to be checked to ensure it contains the field to be updated, and the same modifications must be made, which is prone to omissions and errors. Therefore, reducing the complexity of access control for business users and improving its scalability has become a top priority for access control. Summary of the Invention
[0004] This application provides a data processing method, apparatus, and storage medium, which can reduce the complexity of access control for business users through a unified data update interface, while achieving accurate and fine-grained access control with strong scalability.
[0005] On one hand, embodiments of this application provide a data processing method, the method comprising:
[0006] Receive a data update request sent by a business device through a data update interface. The data update request includes header parameters and content to be updated. The header parameters are used to indicate the target service and the corresponding target scenario on the business device that is requesting data updates.
[0007] The update permissions of the target service are verified based on the header parameters and the content to be updated;
[0008] If the verification passes, the fields corresponding to the target scenario are updated using the content to be updated, and an update record corresponding to the data update request is generated.
[0009] On the other hand, embodiments of this application provide a data processing apparatus, the apparatus comprising:
[0010] The receiving module is used to receive a data update request sent by a business device through a data update interface. The data update request includes header parameters and content to be updated. The header parameters are used to indicate the target service and the corresponding target scenario on the business device that is requesting data updates.
[0011] The processing module is used to verify the update permissions of the target service based on the header parameters and the content to be updated;
[0012] The processing module is further configured to, if the verification passes, update the field corresponding to the target scenario using the content to be updated, and generate an update record corresponding to the data update request.
[0013] Accordingly, this application provides a computer device including a processor, a communication interface, and a memory. The processor, the communication interface, and the memory are interconnected. The memory stores executable program code, and the processor is used to call the executable program code to execute the data processing method described in any of the possible implementations above.
[0014] Accordingly, embodiments of this application provide a computer-readable storage medium storing a computer program, wherein the processor executes the program involved in the data processing method described in any of the above possible implementations.
[0015] Accordingly, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data processing method described in any of the possible implementations above.
[0016] In this embodiment, a data update request sent by a business device through a data update interface can be received. The data update request includes header parameters and content to be updated. The update permission of the target service is verified based on the header parameters and content to be updated. When the verification is successful, the field corresponding to the target scenario is updated using the content to be updated, and an update record corresponding to the data update request is generated. The complexity of the business's permission control can be reduced through a unified data update interface, while achieving accurate and fine-grained permission control with strong scalability. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This application provides a schematic diagram of the architecture of a data processing system.
[0019] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0020] Figure 3 A flowchart illustrating another data processing method provided in an embodiment of this application;
[0021] Figure 4 A flowchart illustrating another data processing method provided in an embodiment of this application;
[0022] Figure 5 A flowchart illustrating another data processing method provided in an embodiment of this application;
[0023] Figure 6 A flowchart illustrating another data processing method provided in an embodiment of this application;
[0024] Figure 7 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0025] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0027] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.
[0028] A database, simply put, can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, shared by multiple users, with minimal redundancy, and independent of application programs. A Database Management System (DBMS) is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup. DBMSs can be classified according to the database model they support, such as relational or XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters or mobile phones; or according to the query language used, such as SQL (Structured Query Language, XQuery); or according to performance priorities, such as maximum scale or maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, supporting multiple query languages simultaneously.
[0029] With the research and advancement of cloud technology, cloud technology has been studied and applied in multiple fields. The plug-in processing method of this application involves technologies such as databases and database management in cloud technology, which will be specifically described through the following embodiments.
[0030] To better understand the data processing method and apparatus provided in the embodiments of this application, the architecture of the data processing system applicable to the embodiments of this application is described below. Please refer to... Figure 1 , Figure 1 This is a schematic diagram of the architecture of the data processing system provided in an embodiment of this application. For example... Figure 1 As shown, the data processing system may include a business device 101, a server 102, a database 103, and a management device 104. The business device 101, server 102, database 103, and management device 104 can be connected via a network, such as a wireless network. There may be one or more business devices 101, server 102, database 103, and management device 104; this application does not limit this.
[0031] Business equipment 101 is a device that processes various services in the network. This device 101 can be a computer device with business applications installed. This computer device can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0032] Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0033] Database 103 can be a distributed database, such as MySQL, Tcaplus, or a data warehouse, etc., and this application does not limit this. A data warehouse (DW) is a system used for reporting and data analysis; it is a central repository for integrated data from one or more different sources. A data warehouse stores current and historical data together to create analytical reports for the entire business.
[0034] The management device 104 is the device that sends the update record query request. It can be a smart TV, a handheld device with wireless communication capabilities (such as a smartphone or tablet), a computing device (such as a personal computer (PC), an in-vehicle device, a wearable device, or other smart devices), but is not limited to these.
[0035] In one embodiment, server 102 receives a data update request sent by business device 101 through a data update interface. The data update request includes header parameters and content to be updated. Server 102 verifies the update permission of the target service based on the header parameters and content to be updated. If the verification passes, server 102 updates the field corresponding to the target scenario using the content to be updated and generates an update record corresponding to the data update request. By storing the update record in database 103, management device 104 can retrieve the update record from database 103 through an update record query request. A unified data update interface can reduce the complexity of permission control for business users, while achieving accurate and fine-grained permission control with strong scalability.
[0036] In one embodiment, business device 101, server 102, database 103 and management device 104 can all be nodes on the blockchain, and data such as header parameters, content to be updated, fields corresponding to the target scenario, and update records can all be stored on the blockchain.
[0037] It is understood that the system architecture diagrams described in one or more embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0038] Please see Figure 2 , Figure 2 A flowchart illustrating a data processing method is provided, which is then applied to... Figure 1 The following steps are described for server 102:
[0039] S201. Receive a data update request sent by a service device through a data update interface. The data update request includes header parameters and content to be updated. The header parameters are used to indicate the target service and the corresponding target scenario on the service device that is requesting the data update.
[0040] The header parameters specify both the target service requesting data updates on the business device and the target scenario corresponding to the data updates. The target service can be any service provided by the business device, which may offer one or more services (this application does not limit this). The scenario typically indicates a function of the business device, such as changing an avatar or personal information. A service typically offers one or more functions, thus usually including one or more scenarios. Therefore, by using the target service and target scenario indicated by the header parameters, it can be determined which service is updating data for which scenario.
[0041] Specifically, when a business device calls the data update interface, the server uses the data update interface to determine whether the business device's data update request includes header parameters and content to be updated. Only when the data update request includes header parameters and content to be updated will the server accept the data update request sent by the business device. If the data update request does not include header parameters, the server determines that the business device does not have update permissions and sends a data update failure message to the business device.
[0042] S202. Verify the update permissions of the target service based on the header parameters and the content to be updated.
[0043] Specifically, the server uses the scene identifier of the target scene and the service identifier of the target service included in the header parameters to determine the update permission of the target service. When the update permission is granted, the authorized update field is determined based on the scene identifier. If the authorized update field includes the field to be updated in the content to be updated, the verification is considered to have passed. If there is a field to be updated that does not belong to the authorized update field, the verification is considered to have failed.
[0044] S203. If the verification passes, the fields corresponding to the target scenario are updated using the content to be updated, and an update record corresponding to the data update request is generated.
[0045] Specifically, when the verification passes, the server uses the data corresponding to the field to be updated in the content to be updated to update the field corresponding to the target scene. For example, if the field to be updated is to change the avatar, then the avatar in the target scene of the business device is updated using the corresponding avatar in the content to be updated. Furthermore, the update record corresponding to the data update request can be generated using the content to be updated and the header parameters included in the data update request.
[0046] In this embodiment, the server receives a data update request sent by a business device through a data update interface. The data update request includes header parameters and content to be updated. The server verifies the update permission of the target service based on the header parameters and content to be updated. If the verification passes, the server updates the field corresponding to the target scenario using the content to be updated and generates an update record corresponding to the data update request. This unified data update interface reduces the complexity of permission control for business users and enables accurate, fine-grained permission control with strong scalability.
[0047] In one embodiment, such as Figure 3 As shown, before receiving the data update request sent by the service device through the data update interface, the following steps are also included:
[0048] S301. Receive an update permission configuration request sent by the service device. The update permission configuration request carries at least one field for data update and the service identifier of the target service.
[0049] Specifically, when a business device has not accessed the data update interface, it can receive an update permission configuration request sent by the business device. The update permission configuration request includes at least one field for data update and the service identifier of the target service. The at least one field can be any field in the business device that needs to be updated in any scenario. For example, when the business device needs to update personal information, the at least one field can be nickname, age, gender, avatar, etc. The target service is a service that can update at least one field.
[0050] S302. Obtain the scene identifier of the target scene set for the update permission configuration request.
[0051] In one embodiment, the update administrator determines the scene identifier of the corresponding target scene based on at least one field carried in the update permission configuration request. The scene identifier can be a number or a letter, etc., and this application does not limit it. For example, if at least one field carried in the update permission configuration request is a nickname, age, gender, avatar, etc., the corresponding target scene can be determined to be changing personal information, and a scene identifier of the target scene can be established, such as 1 or A. Then the scene identifier corresponding to changing personal information is 1 or A.
[0052] In a feasible embodiment, the scene identifier of the corresponding target scene can be determined by using at least one field carried according to a preset strategy. For example, if at least one field includes nickname, age, gender, avatar, etc., the target scene is determined to be a change of personal information. The scene identifier corresponding to the target scene is determined by using a predefined scene mapping table, which determines the mapping relationship between scene identifier and scene description.
[0053] S303. Use the at least one field as the authorization update field corresponding to the scene identifier of the target scene.
[0054] Specifically, after determining the scenario identifier of the target scenario set in the update permission configuration request, at least one field carried in the update permission configuration request can be used as the authorized update field corresponding to the scenario identifier of the target scenario. Alternatively, the update administrator can set update permissions for one or more of the at least one field and use them as the authorized update field corresponding to the scenario identifier of the target scenario.
[0055] S304. Create a mapping relationship between the scene identifier of the target scene and the service identifier of the target service.
[0056] S305. Send the scene identifier of the target scene to the service device.
[0057] The scenario identifier of the target scenario can be used as a header parameter in the data update request when the business device sends a data update request, in order to verify the update permission of the business device.
[0058] Through the embodiments of this application, for the target service and at least one field carried in the update permission configuration request sent by the business device, a scene identifier corresponding to the target scene, an authorized update field corresponding to the scene identifier, and a mapping relationship between the creation scene identifier and the service identifier of the target service can be set, thereby used to verify the update permission of the business device.
[0059] Please see Figure 4 , Figure 4 A flowchart illustrating another data processing method is provided, demonstrating its application in... Figure 1 The following steps are described for server 102:
[0060] S401. Receive a data update request sent by a service device through a data update interface. The data update request includes header parameters and content to be updated. The header parameters are used to indicate the target service and the corresponding target scenario on the service device that is requesting the data update.
[0061] The specific implementation of S401 can be found in the relevant description of S201 in the aforementioned embodiments, and will not be repeated here.
[0062] In one embodiment, before receiving a data update request sent by a business device through a data update interface call, the method further includes: setting unified configuration parameters for the data update interface and sending the unified configuration parameters to the business device.
[0063] The unified configuration parameters include fields for header parameters and fields for content to be updated. Sending the unified configuration parameters to the business device allows the business device to include header parameters and content to be updated in the data update request based on the unified configuration fields.
[0064] In one embodiment, when receiving a data update request sent by a business device through a data update interface, the unified configuration parameters set for the data update interface are equivalent to providing a wide update interface for the business device. This wide update interface can be used to perform preliminary control over the update permissions of the business device. The main method is that when the business device sends a data update request, the data update interface is used to determine whether the data update request includes header parameters. If it does, the data update request sent by the business device is accepted. The header parameters include a service identifier and a scenario identifier. If the service identifier or the scenario identifier is not included, it is determined that the business device does not have update permissions, and a data update failure prompt is sent to the business device.
[0065] S402. If there is a mapping relationship between the service identifier and the scene identifier, then determine the authorized update field based on the scene identifier of the target scene, and determine the field to be updated based on the content to be updated.
[0066] Specifically, although the service identifier and scenario identifier included in the header parameters are used for initial control (i.e., to determine whether both the service identifier and scenario identifier exist), in order to prevent the service from not having data update permissions for a certain scenario, it is further determined whether there is a mapping relationship between the service identifier and the scenario identifier. When there is a mapping relationship between the service identifier and the scenario identifier, the authorized update field is determined according to the scenario identifier of the target scenario, and the field to be updated is determined according to the content to be updated.
[0067] S403. Query whether the authorized update field includes the field to be updated.
[0068] S404. If the authorized update field includes the field to be updated, then the update permission verification for the target service is determined to be successful.
[0069] Specifically, if the authorized update field includes the field to be updated, the update permission verification for the target service is deemed successful; if any field to be updated is not an authorized update field, the update permission verification for the target service is deemed unsuccessful.
[0070] S405. If the verification passes, the fields corresponding to the target scene are updated using the content to be updated, and an update record corresponding to the data update request is generated.
[0071] Specifically, when the verification passes, the server uses the data corresponding to the field to be updated in the content to be updated to update the field corresponding to the target scenario, and uses the content to be updated and header parameters included in the data update request to generate the update record corresponding to the data update request.
[0072] In this embodiment, the server receives a data update request sent by a business device through a data update interface. The data update request includes header parameters and content to be updated. The server verifies the update permission of the target service based on the header parameters and content to be updated. If the verification passes, the server updates the fields corresponding to the target scenario using the content to be updated and generates an update record corresponding to the data update request. This unified data update interface reduces the complexity of permission control for business users and enables accurate, fine-grained permission control with strong scalability.
[0073] In one embodiment, generating an update record corresponding to a data update request includes: obtaining data corresponding to the record fields, performing structured processing on the data corresponding to the record fields, generating a structured update record, and storing the structured update record in a database.
[0074] In one embodiment, the record fields include one or more of the following: update event name, service identifier, scene identifier, scene description of the scene identifier, device identifier, user identifier, update field, content before update, content after update, update time, and importance level.
[0075] Specifically, the service identifier and scenario identifier in the record fields can be determined using the header parameters of the data update request. The updated content can be determined using the content to be updated, which carries a device identifier (such as device SN (product serial number)) or a user identifier (such as user ID). The content before the update can be determined using the device identifier or user device. The scenario description of the scenario identifier can be determined through a predefined scenario mapping table, which defines the mapping relationship between scenario identifiers and scenario descriptions. The following is a specific example of updating a record:
[0076] Update event name: Device data update event
[0077] Service identifier: devicemanageaosvr
[0078] Scene identifier: 201
[0079] Scenario Description: Device Heartbeat
[0080] Device Identifier: FSADFSDLKFSD241 (Device Serial Number)
[0081] Update field: City where the device is located
[0082] Previous content: Guangzhou
[0083] Updated content: Shenzhen
[0084] Updated on: [Date]
[0085] Importance level: General
[0086] Furthermore, the data corresponding to the record fields is processed in a structured manner to generate structured update records, which are then stored in the database. Structured data refers to information that can be represented using data or a unified structure. Structured data has specific fields, i.e., row data, stored in the database, and can be logically expressed using a two-dimensional table structure.
[0087] Specifically, the data reporting storage entity (mmdata) can be used to perform structured processing on the data corresponding to the record fields. mmdata provides an interface for business devices to report data, allows for custom field structures, and is a structured data entity that can be automatically imported into the database using its provided capabilities. Table 1 shows a structured update record:
[0088] Table 1
[0089]
[0090]
[0091] In one embodiment, the data processing method further includes: receiving an update record query request sent by a management device, the update record query request carrying a query field, the query field including one or more record fields; obtaining a target update record matching the query field from the data structured update records stored in the database; and sending the target update record to the management device.
[0092] In one embodiment, when an update record query request is received from a management device, the server uses the query fields carried in the update record query request to retrieve the target update record that matches the query fields from the database, and sends the target update record to the management device. Then, the administrator can obtain the update source and update content details of the data based on the target update record, and can also perform key monitoring and alarms according to the importance level configuration.
[0093] The query fields can be one or more of the following: update event name, service identifier, scene identifier, scene description of the scene identifier, device identifier, user identifier, update field, content before update, content after update, update time, and importance level.
[0094] In this application embodiment, compared with the unstructured method of obtaining update records through logging, this application performs structured processing on the update records. The resulting structured update records can be obtained more conveniently and quickly by management devices, enabling rapid traceability of data change records.
[0095] In one embodiment, such as Figure 5 As shown, when the server receives a data update request, it determines whether the data update request contains header parameters. If it is determined that the data update request contains header parameters, it retrieves the corresponding authorized update field from the configuration based on the scenario identifier, and determines whether the authorized update field contains the field to be updated in the content to be updated. If the authorized update field contains the field to be updated, the corresponding field in the target scenario is updated. If the authorized update field does not contain the field to be updated, or if the data update request does not contain header parameters, the data update fails.
[0096] In one embodiment, such as Figure 6As shown, the business device sends a scene identifier, a service identifier, and the content to be updated to the data update service. The data update service verifies the update permission of the business device based on the service identifier and the scene identifier, and uses the update process reporting to implement the corresponding data update for the business device. Database 1 can store the mapping relationship between scene identifiers and service identifiers, the authorized update fields corresponding to scene identifiers, and scene mapping tables, etc. At the same time, the update record reporting stores the update record corresponding to this data update in database 2. When a user sends an update record query request through the data update traceability query tool, the matching target update record can be queried from database 2.
[0097] like Figure 7 As shown, Figure 7 This is a schematic diagram of a data processing apparatus provided in an embodiment of this application. The apparatus includes:
[0098] The receiving module 701 is used to receive a data update request sent by the business device through calling the data update interface. The data update request includes header parameters and content to be updated. The header parameters are used to indicate the target service and the corresponding target scenario on the business device that is requesting data updates.
[0099] Processing module 702 is used to verify the update permission of the target service based on the header parameters and the content to be updated;
[0100] The processing module 702 is further configured to, if the verification passes, update the field corresponding to the target scene using the content to be updated, and generate an update record corresponding to the data update request.
[0101] In one embodiment, the processing module 702 is specifically used for:
[0102] If there is a mapping relationship between the service identifier and the scene identifier, then the authorized update field is determined according to the scene identifier of the target scene, and the field to be updated is determined according to the content to be updated;
[0103] Check whether the authorized update field includes the field to be updated;
[0104] If the authorized update field includes the field to be updated, then the update permission verification for the target service is deemed successful.
[0105] In one embodiment, the processing module 702 is specifically used for:
[0106] Receive an update permission configuration request sent by the service device, wherein the update permission configuration request carries at least one field for data update and the service identifier of the target service;
[0107] Obtain the scene identifier of the target scene set for the update permission configuration request;
[0108] The scene identifier of the target scene is sent to the service device.
[0109] In one embodiment, the processing module 702 is specifically used for:
[0110] Use the at least one field as the authorization update field corresponding to the scene identifier of the target scene;
[0111] Create a mapping relationship between the scene identifier of the target scene and the service identifier of the target service.
[0112] In one embodiment, the processing module 702 is specifically used for:
[0113] Set the unified configuration parameters for the data update interface, which include fields for header parameters and fields for the content to be updated;
[0114] The unified configuration parameters are sent to the service device.
[0115] In one embodiment, the processing module 702 is specifically used for:
[0116] Retrieve the data corresponding to the record fields;
[0117] The data corresponding to the record fields is processed in a structured manner to generate a structured update record;
[0118] The structured update records are stored in the database.
[0119] In one embodiment, the processing module 702 is specifically used for:
[0120] Receive an update record query request sent by the management device, the update record query request carrying query fields, the query fields including one or more of the record fields;
[0121] Retrieve the target update record that matches the query field from the structured update records stored in the database;
[0122] The target update record is sent to the management device.
[0123] In this embodiment, the server receives a data update request sent by a business device through a data update interface. The data update request includes header parameters and content to be updated. The server verifies the update permission of the target service based on the header parameters and content to be updated. If the verification passes, the server updates the field corresponding to the target scenario using the content to be updated and generates an update record corresponding to the data update request. This unified data update interface reduces the complexity of permission control for business users and enables accurate, fine-grained permission control with strong scalability.
[0124] like Figure 8 As shown, Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The internal structure of the device is as follows: Figure 8 As shown, it includes: one or more processors 801, memory 802, and communication interface 803. The processors 801, memory 802, and communication interface 803 can be connected via bus 804 or other means. This embodiment of the application takes the connection via bus 804 as an example.
[0125] The processor 801 (or CPU, Central Processing Unit) is the computing and control core of the computer device. It can parse various instructions and process various data within the computer device. For example, the CPU can parse power-on / off commands sent by the user and control the computer device to perform power-on / off operations; it can also transmit various interactive data between internal structures of the computer device. The communication interface 803 may optionally include standard wired interfaces or wireless interfaces (such as Wi-Fi, mobile communication interfaces, etc.), and is controlled by the processor 801 for sending and receiving data. The memory 802 is the storage device in the computer device, used to store programs and data. It is understood that the memory 802 here can include the computer device's built-in memory, or it can include extended memory supported by the computer device. The memory 802 provides storage space for the computer device's operating system, which may include, but is not limited to, Windows systems, Linux systems, etc., and this application does not limit this.
[0126] In one embodiment, the processor 801 is specifically used for:
[0127] Receive a data update request sent by a business device through a data update interface. The data update request includes header parameters and content to be updated. The header parameters are used to indicate the target service and the corresponding target scenario on the business device that is requesting data updates.
[0128] The update permissions of the target service are verified based on the header parameters and the content to be updated;
[0129] If the verification passes, the fields corresponding to the target scenario are updated using the content to be updated, and an update record corresponding to the data update request is generated.
[0130] In one embodiment, the processor 801 is specifically used for:
[0131] If there is a mapping relationship between the service identifier and the scene identifier, then the authorized update field is determined according to the scene identifier of the target scene, and the field to be updated is determined according to the content to be updated;
[0132] Check whether the authorized update field includes the field to be updated;
[0133] If the authorized update field includes the field to be updated, then the update permission verification for the target service is deemed successful.
[0134] In one embodiment, the processor 801 is specifically used for:
[0135] Receive an update permission configuration request sent by the service device, wherein the update permission configuration request carries at least one field for data update and the service identifier of the target service;
[0136] Obtain the scene identifier of the target scene set for the update permission configuration request;
[0137] The scene identifier of the target scene is sent to the service device.
[0138] In one embodiment, the processor 801 is specifically used for:
[0139] Use the at least one field as the authorization update field corresponding to the scene identifier of the target scene;
[0140] Create a mapping relationship between the scene identifier of the target scene and the service identifier of the target service.
[0141] In one embodiment, the processor 801 is specifically used for:
[0142] Set the unified configuration parameters for the data update interface, which include fields for header parameters and fields for the content to be updated;
[0143] The unified configuration parameters are sent to the service device.
[0144] In one embodiment, the processor 801 is specifically used for:
[0145] Retrieve the data corresponding to the record fields;
[0146] The data corresponding to the record fields is processed in a structured manner to generate a structured update record;
[0147] The structured update records are stored in the database.
[0148] In one embodiment, the processor 801 is specifically used for:
[0149] Receive an update record query request sent by the management device, the update record query request carrying query fields, the query fields including one or more of the record fields;
[0150] Retrieve the target update record that matches the query field from the structured update records stored in the database;
[0151] The target update record is sent to the management device.
[0152] In this embodiment, the server receives a data update request sent by a business device through a data update interface. The data update request includes header parameters and content to be updated. The server verifies the update permission of the target service based on the header parameters and content to be updated. If the verification passes, the server updates the field corresponding to the target scenario using the content to be updated and generates an update record corresponding to the data update request. This unified data update interface reduces the complexity of permission control for business users and enables accurate, fine-grained permission control with strong scalability.
[0153] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the data processing method described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0154] One or more embodiments of this application also provide a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps performed in the embodiments of the methods described above.
[0155] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A data processing method, characterized in that, The method includes: Receive an update permission configuration request sent by a service device, wherein the update permission configuration request carries at least one field for data update and the service identifier of the target service; The scene description of the target scene is determined based on the at least one field, and the scene identifier of the target scene is queried from the scene mapping table based on the scene description of the target scene. The scene identifier of the target scene is sent to the service device. The scene mapping table includes the mapping relationship between the scene identifier and the scene description. Use the at least one field as the authorization update field corresponding to the scene identifier of the target scene, and create a mapping relationship between the scene identifier of the target scene and the service identifier of the target service; The system receives a data update request sent by the business device through a data update interface. The data update request includes header parameters and content to be updated. The header parameters include the service identifier of the target service and the scene identifier of the target scene. The target service is any one of one or more services provided by the business device, and each service includes one or more scenes. If there is a mapping relationship between the service identifier of the target service and the scene identifier of the target scene, then the authorization update field is determined according to the scene identifier of the target scene, and the field to be updated is determined according to the content to be updated; Check whether the authorized update field includes the field to be updated. If the authorized update field includes the field to be updated, then the update permission verification for the target service is confirmed to be successful. If the verification passes, the fields corresponding to the target scenario are updated using the content to be updated, and an update record corresponding to the data update request is generated.
2. The method according to claim 1, characterized in that, Before receiving the data update request sent by the service device through the data update interface, the method further includes: Set the unified configuration parameters for the data update interface, which include fields for header parameters and fields for the content to be updated; The unified configuration parameters are sent to the service device.
3. The method according to claim 1, characterized in that, Generating the update record corresponding to the data update request includes: Retrieve the data corresponding to the record fields; The data corresponding to the record fields is processed in a structured manner to generate a structured update record; The structured update records are stored in the database.
4. The method according to claim 3, characterized in that, The record fields include one or more of the following: update event name, service identifier, scene identifier, scene description of the scene identifier, device identifier, user identifier, update field, content before update, content after update, update time, and importance level.
5. The method according to claim 3 or 4, characterized in that, The method further includes: Receive an update record query request sent by the management device, the update record query request carrying query fields, the query fields including one or more of the record fields; Retrieve the target update record that matches the query field from the structured update records stored in the database; The target update record is sent to the management device.
6. A data processing apparatus, characterized in that, The device includes: The processing module is configured to receive an update permission configuration request sent by a service device, wherein the update permission configuration request carries at least one field for data update and a service identifier of the target service; determine a scenario description of the target scenario based on the at least one field, query the scenario identifier of the target scenario from a scenario mapping table based on the scenario description of the target scenario, and send the scenario identifier of the target scenario to the service device; wherein the scenario mapping table includes a mapping relationship between scenario identifiers and scenario descriptions. The processing module is further configured to use the at least one field as the authorization update field corresponding to the scene identifier of the target scene, and to create a mapping relationship between the scene identifier of the target scene and the service identifier of the target service; The receiving module is used to receive a data update request sent by the business device through calling the data update interface. The data update request includes header parameters and content to be updated. The header parameters include the service identifier of the target service and the scene identifier of the target scene. The target service is any one of one or more services provided by the business device, and each service includes one or more scenes. The processing module is further configured to: if there is a mapping relationship between the service identifier of the target service and the scene identifier of the target scene, determine the authorized update field based on the scene identifier of the target scene, and determine the field to be updated based on the content to be updated; query whether the authorized update field includes the field to be updated, and if the authorized update field includes the field to be updated, determine that the update permission verification for the target service has passed; The processing module is further configured to, if the verification passes, update the field corresponding to the target scenario using the content to be updated, and generate an update record corresponding to the data update request.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the data processing method according to any one of claims 1 to 5.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a computer processor, it implements the data processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data updating method, device and system
CN108023908A
Business data processing method and device
CN111177252A